Configuring Your Web Server for Custom Error Documents

Before you can use custom error documents, you have to set up your Web server to send your custom documents instead of sending the default ones. Custom error documents can be plain HTML documents or they can be generated dynamically using CGI scripts. This section includes instructions on setting up pointers to custom error documents on several popular Web servers.

The Apache Web Server

The Apache Web server has very robust support for custom error documents. You can specify custom error documents in a wide variety of contexts. For example, you can modify the global configuration files to specify specific error documents for the entire server, for virtual hosts served by the server, or ...

Get Sams Teach Yourself CGI in 24 Hours, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.