请教关于使用Nginx代理登录自动退出的问题
有这样一个nginx 代理,访问abc.com后,在页面上随便点几个页面后就会自动退出登录页面。于是我把nginx配置文件里面的192.168.1.145或192.168.1.146随便注释一个,在用nginx访问abc.com就不再出现自动退出登录页面的现象,请问这是为什么,需要怎么解决
另外:两个服务器之间没有共享session,所以用了ip_hash,但是还是会登录退出,后端是两个tomcat;
部分配置信息:
http{
keepalive_timeout 65;
upstream hello{
ip_hash;
server 192.168.1.xxx;
server 192.168.1.xxx ;
}
server {
listen 80;
server_name 127.0.0.1;
location /nginxstatus{
stub_status on;
access_log on;
auth_basic "nginxstatus";
auth_basic_user_file htpasswd;
}
location / {
index index.jsp;
proxy_pass http://hello;
proxy_redirect off;
......
}
}
}