location ^~ /login/Jeecms.do {
root html;
index index.html index.htm;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_redirect off;
proxy_connect_timeout 60;
proxy_send_timeout 60;
proxy_read_timeout 60;
proxy_pass http://jboss;
allow 127.0.0.1;
allow 192.168.69.0/255;
allow 182.48.117.2;
deny all;
}
root html;
index index.html index.htm;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_redirect off;
proxy_connect_timeout 60;
proxy_send_timeout 60;
proxy_read_timeout 60;
proxy_pass http://jboss;
allow 127.0.0.1;
allow 192.168.69.0/255;
allow 182.48.117.2;
deny all;
}
本文展示了一段Nginx配置代码,用于设置特定登录路径的代理转发与访问控制规则。该配置允许从指定IP地址访问/login/Jeecms.do路径,并将其请求代理到后端Jboss服务器。
1843

被折叠的 条评论
为什么被折叠?



