We have an pretty standard nginx, Apache and PHP-FPM reverse proxy setup on Ubuntu 20 installed through ServerPilot.
Our nginx location context is configured simply as this:
proxy_pass $backend_protocol://$backend_host:$backend_port;
add_header 'Access-Control-Allow-Origin' '*';
Those variables resolve to http://127.0.0.1:81
The site has been working flawlessly for several weeks and thousands of users.
However, we have two users who were accessing the frontend address (e.g. https://example.com
), and for some reason I cannot discern, were redirected to the backend address and received this browser error.
When these users do any of the following, loading the home page works as expected:
- Open the Network Console and check "Disable cache"
- Load the site in Incognito mode
- The user goes to https://example.com/index.php (which is the only possible index page for the request)
However, even after successfully loading the home page through any of these methods, after quitting the browser and re-opening, the behavior returns - attempts to load the home page without 'index.php' get redirected to the backend server address for the two users.
My two questions:
- What could be causing this to happen, and very rarely?
- How can we clear this condition for users who are affected without having them dump their entire browser cache (which I'm not 100% confident will work anyway)?