配置

封禁 IP

[1]

/etc/nginx/blockips.conf:

deny 1.2.3.4;
deny 5.6.7.8;
# deny 192.168.1.0/24;
# deny all;

/etc/nginx/nginx.confhttp 块中加入

include blockips.conf;

参考资料