这是我面临的另一个问题。我的门户正在运行http://test.example.com:8080/AppWise和http://test.example.com/WebAdmin
现在我通过 Nginx 反向代理转移了该门户
这是我的配置
server {
listen 8080;
listen 80;
server_name test.example.com;
access_log /var/log/nginx/twprod/access.log;
error_log /var/log/nginx/twprod/error.log;
include /etc/nginx/applox/feeds/badips.txt;
location /AppWise/ {
client_max_body_size 10m;
client_body_buffer_size 128k;
proxy_send_timeout 90;
proxy_read_timeout 90;
proxy_buffer_size 128k;
proxy_buffers 4 256k;
proxy_busy_buffers_size 256k;
proxy_temp_file_write_size 256k;
proxy_connect_timeout 30s;
proxy_pass http://test.example.com:8080;
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 /WebAdmin/ {
client_max_body_size 10m;
client_body_buffer_size 128k;
proxy_send_timeout 90;
proxy_read_timeout 90;
proxy_buffer_size 128k;
proxy_buffers 4 256k;
proxy_busy_buffers_size 256k;
proxy_temp_file_write_size 256k;
proxy_connect_timeout 30s;
proxy_pass http://test.example.com:8080;
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;
}
}
问题是第一页正确打开,然后要求输入用户名密码;这很好。现在登录后我突然收到 302 并且页面转移到 http://test/example.com/Appwise/<...........REST of the URI.....>
10.0.22.99 - - [20/Sep/2021:18:41:05 +0530] "POST /AppWise/servlet/TeamAccess/Login HTTP/1.1" 302 0 "http://test.example.com:8080/AppWise/servlet/TeamAccess/Login" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/93.0.4577.82 Safari/537.36"
10.0.22.99 - - [20/Sep/2021:18:47:42 +0530] "POST /AppWise/servlet/TeamAccess/Login HTTP/1.1" 302 0 "http://test.example.com:8080/AppWise/servlet/TeamAccess/Login" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/93.0.4577.82 Safari/537.36"
10.0.22.99 - - [20/Sep/2021:18:51:04 +0530] "POST /AppWise/servlet/TeamAccess/Login HTTP/1.1" 302 0 "http://test.example.com:8080/AppWise/servlet/TeamAccess/Login" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/93.0.4577.82 Safari/537.36"
我希望此页面停留在http://test.example.com:8080