404 Not Found The server can not find the requested page
We are migrating from CentOS 5 to CentOS 7.
We have set up a new machine with CentOS 7, and have moved our existing database and files to the new machine, as well as our cPanel accounts.
The new machine is on a new IP, so we are using our hosts file to view the CentOS 7 machine via the same domain name.
The issue is the sporadic and intermittent pages saying this:
Now this can happen on any type of page, file or resource. The page can be loading fine, and all resources are loading, and then next time you refresh the page, the 404 Not Found error appears. Sometimes the page will load, but the resources (js, css, images) will not load and return a 404 Not Found. Accessing WHM through the IP address of the server doesn't have any issues at all - all pages load correctly every time. What could possibly be going on? Intermittent issues are hard to isolate, but surely there must be an answer. I've google the error and there a lot of pages mentioning the 'mod_userdir' tweak, however I can't see how this would be the issue since we are getting the page intermittently. Also there are no errors in the error_log when these pages appear.
404 Not Found
Please forward this error screen to www.domain.com's WebMaster.
The server can not find the requested page:
www.domain.com (port 80)
Now this can happen on any type of page, file or resource. The page can be loading fine, and all resources are loading, and then next time you refresh the page, the 404 Not Found error appears. Sometimes the page will load, but the resources (js, css, images) will not load and return a 404 Not Found. Accessing WHM through the IP address of the server doesn't have any issues at all - all pages load correctly every time. What could possibly be going on? Intermittent issues are hard to isolate, but surely there must be an answer. I've google the error and there a lot of pages mentioning the 'mod_userdir' tweak, however I can't see how this would be the issue since we are getting the page intermittently. Also there are no errors in the error_log when these pages appear.
-
I seem more like a hostname not resolving correctly to, or some DNS issue, Can you show some e.g website to recheck the DNS status to find more about the exact problem. 0 -
The new machine is on a new IP, so we are using our hosts file to view the CentOS 7 machine via the same domain name.
Hello, Can you confirm that you configured entries in your hosts file for your domain name and the "www" subdomain as well? Thank you.0 -
Can you confirm that you configured entries in your hosts file for your domain name and the "www" subdomain as well?
Hi Michael, I will make that change now and let you know how I go. At the moment I just have it at the "www" subdomain. Can you confirm if it should be:123.45.67.89 domain.com www.domain.com
OR123.45.67.89 domain.com 123.45.67.89 www.domain.com
0 -
UPDATE Even before I added the extra line into my hosts file, this issue appears to have stopped. Nothing was done at my end, or the end of the server, so I can only assume it was to do with something caching. This is both good and bad. I wish I knew why the error was occurring so I would have the ability to address the issue again if need be. @cPanelMichael - could something have been caught in a cache that was causing this intermittent error to appear? Have you heard of such a thing? 0 -
.45.67.89 domain.com www.domain.com
This would be the correct entry. It's possible the lack of the www entry was the reason this was happening. Let us know if the issue continues now that you've added the entry to your hosts file. Thank you.0
Please sign in to leave a comment.
Comments
5 comments