We help IT Professionals succeed at work.

Apache's Own Error Msg Pages

thewing
thewing asked
on
Hi,
 Can someone tell me where apache generally stores it's own error msg pages, such as 404 (File Not Found) etc. and if these are customizable.I know there is a directive called ErrorDocument that can be written into the httpd.conf file, but it is not redirecting to the file I am directing it to?Any takers?

Cheers
Comment
Watch Question

Commented:
Recheck your use of the ErrorDocument directive.  This should go in your httpd.conf file The syntax should be:

ErrorDocument 404 /pathtyournotfound/notfound.html (relative)

or even

ErrorDocument 404 http://www.yourdomain.com/errors/notfound.html

In notfound.html, you can have whatever verbage and static html that you want.

Using whatever cgi support you have enabled, you can also create an intelligent page which includes things like REDIRECT_URL, REDIRECT_STATUS, REDIRECT_ERROR_NOTES, REDIRECT_REMOTE_ADDR, etc.

Again the same syntax holds true, except that you'd reference the cgi page.
Commented:
apache default log path is /var/log/httpd/error_log for the error messages. secondly after putting the directive you need to restart the apache for it to take effect..

Explore More ContentExplore courses, solutions, and other research materials related to this topic.