404 Not Found The server can not find the requested page

dancingpony

Member
Mar 29, 2016
10
1
3
Brisbane, Australia
cPanel Access Level
Root Administrator
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:

Code:
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.
 
Last edited:

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,910
2,215
363
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.
 

dancingpony

Member
Mar 29, 2016
10
1
3
Brisbane, Australia
cPanel Access Level
Root Administrator
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:
Code:
123.45.67.89 domain.com www.domain.com
OR
Code:
123.45.67.89 domain.com
123.45.67.89 www.domain.com
 

dancingpony

Member
Mar 29, 2016
10
1
3
Brisbane, Australia
cPanel Access Level
Root Administrator
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?