IT其它Nginx

nginx配置问题请教?

请教一个问题~
1.nginx做的反向代理。当访问http://www.123.com/abc,登陆成功后。同一个浏览器新开窗口输入http://www.123.com/abc,新旧窗口都不需要重新登陆,可正常访问
2.当新窗口输入http://www.123.com自动跳转http://www.123.com/123后,新网页需要重新登陆,原网页登出了,也需要重新登陆,这是为啥

nginx部分配置如下:

upstream localhost {
       server 10.20.2.1 weight=5 max_fails=1 fail_timeout=1s;
       server 10.20.2.2 weight=5 max_fails=1 fail_timeout=1s;
       server 10.20.2.3 weight=5 max_fails=1 fail_timeout=1s;
                   }

server {
        listen       80;
        server_name  www.123.com;
         charset UTF-8;

        location / {
            add_header Access-Control-Allow-Origin *;
            root   html;
            index  index.jsp index.html index.htm;
            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;
            client_max_body_size 10m;
            client_body_buffer_size 128k;
            proxy_buffers 32 4k;
            rewrite ^/(.*)$ /abc/$1 last;
            proxy_pass http://localhost;
            proxy_intercept_errors on;
            expires      1d;
        }

location /abc {
        proxy_pass    http://localhost;
        proxy_redirect default ;
        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;
                 }
                 }

参与5

2同行回答

aesthetikeraesthetiker数据库管理员chinaunicom
jsession_id 被覆盖了显示全部

jsession_id 被覆盖了

收起
系统集成 · 2020-03-10
浏览1314
匿名用户匿名用户
应该是JSESSIONID被覆盖了,修改以下应用服务器的配置,每个应用的jsessionid都不一样就可以了。显示全部

应该是JSESSIONID被覆盖了,修改以下应用服务器的配置,每个应用的jsessionid都不一样就可以了。

收起
银行 · 2019-09-25
浏览1435

提问者

二宝_12345
其它龙腾光电
擅长领域: 服务器数据库存储

相关问题

相关资料

相关文章

问题状态

  • 发布时间:2019-09-23
  • 关注会员:3 人
  • 问题浏览:2754
  • 最近回答:2020-03-10
  • X社区推广