[Help] Setup 404 page for all domains

kouh

Registered
Sep 2, 2009
2
0
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?
 

kouh

Registered
Sep 2, 2009
2
0
51
Anyone, please?

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