Differences between revisions 1 and 2
Revision 1 as of 2015-07-28 10:03:18
Size: 1339
Editor: wilhelms
Comment:
Revision 2 as of 2015-07-28 10:08:07
Size: 1552
Editor: wilhelms
Comment:
Deletions are marked like this. Additions are marked like this.
Line 10: Line 10:
Line 11: Line 12:
ErrorDocument 400 /errors/badreq.html 
ErrorDocument 401 /errors/noauth.html 
ErrorDocument 403 /errors/forbid.html 
ErrorDocument 404 /errors/missing.html 
ErrorDocument 400 /errors/badreq.html
ErrorDocument 401 /errors/noauth.html
ErrorDocument 403 /errors/forbid.html
ErrorDocument 404 /errors/missing.html
Line 18: Line 19:
Line 25: Line 27:
'''Apache 2.2'''
Line 26: Line 29:
'''Apache 2.2''' http://httpd.apache.org/docs/2.2/mod/core.html#errordocument
Line 28: Line 32:

http://httpd.apache.org/docs/2.4/mod/core.html#errordocument

'''Nginx'''

http://nginx.org/en/docs/http/ngx_http_core_module.html#error_page

Question: Setting up custom Apache error documents.

Shared Accounts:

Go into the Domain Management area of the Kattare Members Section. In there you can select the domain you wish to edit. Once you have selected the domain you wish to edit, you can plug in custom error document settings for your domain. Don't forget to hit "Save" when you are done!

Dedicated Servers:

In our default setup, you can use the following in the /etc/httpd.conf configuration file. If you've customized your apache install at all, you should be aware of the location of your httpd.conf. (Note that you can also put these in .htaccess files on a per-directory basis.) The format is "ErrorDocument <error-code> <URL>". Most, but not all of these require a relative URL.

ErrorDocument 400 /errors/badreq.html
ErrorDocument 401 /errors/noauth.html
ErrorDocument 403 /errors/forbid.html
ErrorDocument 404 /errors/missing.html
ErrorDocument 500 /errors/conferr.html

You can also redirect people off of your site using an external URL.

ErrorDocument 403 http://www.kattare.com/

Do not forget to restart apache after changing the config with an 'apachectl restart'.

For more detailed information the following links should help.

Apache 2.2

http://httpd.apache.org/docs/2.2/mod/core.html#errordocument

Apache 2.4

http://httpd.apache.org/docs/2.4/mod/core.html#errordocument

Nginx

http://nginx.org/en/docs/http/ngx_http_core_module.html#error_page


CategoryDedicatedServers

DedicatedServers/setting-up-custom-apache-error-documents (last edited 2015-07-28 10:08:07 by wilhelms)