Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

404 Not Found The server can not find the requested page

Discussion in 'General Discussion' started by dancingpony, Feb 1, 2017.

  1. dancingpony

    dancingpony Member

    Joined:
    Mar 29, 2016
    Messages:
    10
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    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.
     
    #1 dancingpony, Feb 1, 2017
    Last edited: Feb 1, 2017
  2. webhostuk

    webhostuk Well-Known Member

    Joined:
    Sep 11, 2013
    Messages:
    112
    Likes Received:
    11
    Trophy Points:
    18
    cPanel Access Level:
    Website Owner
    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.
     
  3. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,658
    Likes Received:
    1,425
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    Can you confirm that you configured entries in your hosts file for your domain name and the "www" subdomain as well?

    Thank you.
     
  4. dancingpony

    dancingpony Member

    Joined:
    Mar 29, 2016
    Messages:
    10
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    Brisbane, Australia
    cPanel Access Level:
    Root Administrator
    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
     
  5. dancingpony

    dancingpony Member

    Joined:
    Mar 29, 2016
    Messages:
    10
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    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?
     
  6. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,658
    Likes Received:
    1,425
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    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.
     
Loading...

Share This Page