upstream tomcats {
server 192.168.169.128:8081;
server 192.168.169.128:8082;
}
location / {
root /usr/share/nginx/html;
index index.html index.htm;
proxy_pass http://tomcats;
proxy_set_header Host $host;
}
配置如上,proxy_set_header Host $host;这一段是后来加的,没有什么用
普通刷新,访问了第一个tomcat后,刷新一下会访问第二个tomcat,但是再刷新就一直是访问第二个tomcat
通过不同的标签页是可以进行轮询的
并且通过ctrl+F5强制刷新也可以进行轮询,但是治标不治本
请问大神怎样解决这个问题
server 192.168.169.128:8081;
server 192.168.169.128:8082;
}
location / {
root /usr/share/nginx/html;
index index.html index.htm;
proxy_pass http://tomcats;
proxy_set_header Host $host;
}
配置如上,proxy_set_header Host $host;这一段是后来加的,没有什么用
普通刷新,访问了第一个tomcat后,刷新一下会访问第二个tomcat,但是再刷新就一直是访问第二个tomcat
通过不同的标签页是可以进行轮询的
并且通过ctrl+F5强制刷新也可以进行轮询,但是治标不治本
请问大神怎样解决这个问题
处理方式也很简单在nginx加一下如下配置 location /favicon.ico {
}
然后重启nginx 或者nginx -s reload就搞定了