1.在 blocksip.conf 文件中加入要屏蔽的ip或者ip端
vi /usr/local/nginx/conf/conf.d/feifa.conf
deny IP1;
deny 127.0.0.1.0/24;
2. 在nginx.conf中包含这个文件
vi /usr/local/nginx/nginx.conf
http {
.......
.......
include /usr/local/nginx/conf/conf.d/*.conf;
}
3.重启服务
/usr/local/nginx/sbin/nginx -s reload