Get your server issues fixed by our experts for a price starting at just 25 USD/Hour. Click here to register and open a ticket with us now!

Author Topic: Use Custom Error Pages  (Read 2780 times)

0 Members and 1 Guest are viewing this topic.

Vinil

  • Guest
Use Custom Error Pages
« on: November 07, 2013, 05:53:09 pm »
We can use custom error pages for your Apache Webserver. This can be achieved by creating an alias for “/errorfolder” in the /usr/local/apache/conf/httpd.conf file via the following steps:

1). Create a directory in /usr/local/apache to store your custom error messages. For example name the directory “customerror”:

mkdir /usr/local/apache/customerror

2). Ensure your custom error pages have been added to this directory (400.shtml, 404.shtml, etc).
3). In Web Host Manager, browse to:

“WHM Main >> Service Configuration >> Apache Configuration >> Include Editor”

4). Select “All Versions” under “Pre Virtual Host Include”.
5). Add the following to the text box:

Alias /errorfolder /usr/local/apache/customerror/
ErrorDocument 400 /errorfolder/400.shtml
ErrorDocument 401 /errorfolder/401.shtml
ErrorDocument 403 /errorfolder/403.shtml
ErrorDocument 404 /errorfolder/404.shtml
ErrorDocument 500 /errorfolder/500.shtml


6). Click “Update”, and then click “Restart Apache”.

Your custom error pages will now be used by default.