Why Is Nginx Randomly Switching My Homepage Back to the "Welcome to Nginx!" Page?
First, a bit of context:
I’ve set up multiple droplets with Nginx and the same application code, under /var/www/, while the public folder is /var/www/html.
I’m load balancing between these droplets using HA Proxy.
I have a maintenance script that needs to run continuously and can be quite resource-intensive at times.
I’ve noticed that, sometimes, after running that script, my homepage is switched from the normal application page to the default “Welcome to Nginx!” page.
I find this behavior quite strange and my immediate reaction was to rebuild all these droplets from backup, which immediately solves the problem, which gives me quite a bit of confidence that it’s not a configuration issue, but rather a combination that results in this behavior from Nginx.
Do you, guys, know any circumstances under which Nginx would switch to the default page and stop serving my index.php page? I don’t have any clues and I also lost all the possible error logs when rebuilding the droplets (note to self: check the logs first next time this happens).
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.×