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:
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
If I change to
it work for all domains.
But if I change to
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?
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.
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
Code:
# 404 - Not Found
ErrorDocument 404 http://www.google.com
But if I change to
Code:
# 404 - Not Found
ErrorDocument 404 /usr/local/apache/htdocs/404.shtml
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?