nginx 禁止指定的IP地址访问3

步骤1:添加配置

# 在nginx的配置文件中,即http中,server外,直接添加如下的配置

deny IP地址1;
deny IP地址2;


步骤2:重启Nginx服务器