server {
listen 80;
server_name xxx.com;
index index.jsp index.html index.html index.shtml;
location / {
proxy_pass http://127.0.0.1:8090;
#Proxy Settings;
###proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
location ^~ /job/ {
deny ip;
deny ip;
proxy_pass http://127.0.0.1:8090;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}
nginx限制指定IP禁止访问指定目录
猜你喜欢
转载自blog.csdn.net/ccagy/article/details/112412281
今日推荐
周排行