Nginx白名单设置
程序员文章站
2022-05-19 09:05:29
...
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;
}
}
转载于:https://blog.51cto.com/8999a/2120007
上一篇: 安装rocketmq单节点