In the event of a problem or error, Apache can be configured to do one of four things:
Output a simple hard-coded error message
Output a customized message
Redirect to a local URL path to handle the error
Redirect to an external URL to handle the error
The first option is the default, while the remaining options are configured using the ErrorDocument directive, which is followed by the HTTP response code and a URL or a message. Apache sometimes offers additional information regarding the problem or error.
The Error Responses page lets you customize Apache's response to the following errors:
Unauthorized (401)
Forbidden (403)
Not found (404)
Server error (500)