Home > Back-end >  Nginx is configured with the default polling mode, but the polling failure, can only access a tomcat
Nginx is configured with the default polling mode, but the polling failure, can only access a tomcat

Time:11-23

Upstream tomcats {
Server 192.168.169.128:8081;
Server 192.168.169.128:8082;
}
The location/{
Root/usr/share/nginx/HTML;
The index index. HTML index. HTM;
Proxy_pass http://tomcats;
Proxy_set_header Host $Host;
}
The configuration above, proxy_set_header Host $Host; This paragraph is then, there is no use
Ordinary refresh, visited after the first tomcat, refresh will visit the second tomcat, but again refresh has been access to the second tomcat
Through the different tabs can poll
And by CTRL + F5 to refresh the compulsory can poll, but take temporary solution not effect a permanent cure
Great god how to solve this problem, please

CodePudding user response:

Did you use the browser to access, no accident of words each time you refresh will send two requests to the backend, so you can see that the request is a background, but there is a static is invisible to the icon to access you are another background, according to the F12 cut open a browser debugging to the network TAB page, refresh the page to verify that if in the same way as me, then find out why the


It is very easy handling

In nginx once the following configuration
 
The location/favicon. Ico {
}


And then restart the nginx or nginx -s have to reload

CodePudding user response:

Only for Google browser, but can't find or if there is a static page resources not polling

CodePudding user response:

reference 1 floor faith. Huan response:
are you using a browser to access, no accident of words each time you refresh will send two requests to the backend, so you can see that the request is a background, but there is still a static is invisible to the icon to access you are another background, according to the F12 cut open a browser debugging to the network TAB page, refresh the page to verify that if in the same way as me, then find out why the


It is very easy handling

In nginx once the following configuration
 
The location/favicon. Ico {
}


And then restart the nginx or nginx -s have to reload
I just get dizzy with this
  • Related