nginx禁止指定ip访问完整配置
时间: 2023-05-23 07:00:59 浏览: 157
nginx访问控制的实现示例
server {
listen 80;
server_name localhost;
root /usr/share/nginx/html;
location / {
deny 192.168.1.100; # 禁止192.168.1.100访问
allow all;
index index.html index.htm;
}
}
阅读全文