分类
IT运维

nginx反向代理tomcat session丢失问题

nginx反向代理tomcat session丢失问题解决方法如下:
location / {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header REMOTE-HOST $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://tomcat/Shop/;
#关键配置
proxy_cookie_path /Shop/ /;
}