标签:nginx白名单设置 nginx设置 白名单设置 nginx
Nginx白名单设置
vim langba888.conf
server {
listen 80;
server_name www.langba888.com;
allow 192.168.137.52; #只允许该ip访问,其他拒绝
deny all;
location / {
proxy_pass http://192.168.137.52:999; #反向代理到后端的ip+端口
proxy_set_header Host $host;
proxy_set_header SiteCode "langba";
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
}
标签:nginx白名单设置 nginx设置 白名单设置 nginx
原文地址:http://blog.51cto.com/8999a/2120007