When configuring url rewrite in nginx, in order to keep the URL in the browser address bar unchanged, proxy_pass reverse proxy is used, but a new jsessionid will be generated every time. The specific configuration is as follows:
server {
listen 80;
server_name www.demo.com;
root /www/webapps/demo;
index index.html index.htm;
location / {
proxy_pass http://localhost:81/;
include naproxy.conf;
}
}
I have configured the app in tomcat as a virtual host!
According to this post, I also tried it, but it didn’t work!
What’s strange to me is that I directly use locahost:81 to access the application, and the cookie’s Path=/, which is normal!
But when you use www.demo.com to access it, the damn Path becomes abnormal!
Kneel down and wait for the master 1