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!

[Help] Setup 404 page for all domains

Discussion in 'General Discussion' started by kouh, Feb 9, 2010.

  1. kouh

    kouh Registered

    Joined:
    Sep 2, 2009
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    51
    Hi all.

    I'm trying to setup a custom 404 error page in whm/cpanel.

    I copy my custom page to /usr/local/apache/htdocs and /usr/local/cpanel/htdocs.

    If I try http://IP/test.html or http://hostname/test.html (test.html doesn't exist), it works. It shows the correctly the error page.

    But if I try http://domain.com/test.html, it shows:
    Code:
    Not Found
    The requested URL /ola.html was not found on this server.
    Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
    This happens for all domains in the server.

    How can I make this custom error page work for all domains in the server?




    P.S.:
    I have tried some configurations in /usr/local/apache/error/includes/errordocument.conf. This is the file
    Code:
    # 404 - Not Found
    ErrorDocument 404 /404.shtml
    If I change to
    Code:
    # 404 - Not Found
    ErrorDocument 404 http://www.google.com
    it work for all domains.
    But if I change to
    Code:
    # 404 - Not Found
    ErrorDocument 404 /usr/local/apache/htdocs/404.shtml
    it doesn't work for any domain.


    I also tried to make some configurations in httpd.conf. But I think that the configurations were wrong.

    Can anyone give me any help? Why it works with the IP, but not the domains?
     
  2. kouh

    kouh Registered

    Joined:
    Sep 2, 2009
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    51
    Anyone, please?

    How can I make the 404 custom page, shows up with the domains?
     
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice