Apache::ErrorControl Perl module is an Apache Handler for Templating Apache Error Documents.
This mod_perl content handler will make templating your ErrorDocument pages easy. Basically you add a couple of entries to your httpd.conf file restart apache, make your template and your cruising.
The module uses HTML::Template::Set (which is essentially HTML::Template with the ability to use TMPL_SET tags). So for help templating your error pages please see: HTML::Template::Set and HTML::Template. Also check the OPTIONS section of this documentation for available TMPL_SET/TMPL_IF and TMPL_VAR params.
By default when an error 500 (internal server error) is encountered an error email is sent about it. the addresses emailed depend on the options specified. please see the OPTIONS section for help configuring this. you can also extend the system to send error emails on more than just internal server errors, please see the EmailOn option for how to do this.
Templates are looked up in the following order: the document root is scanned for 'allerrors', 'allerrors.tmpl', error code or error code.tmpl. if no templates are found the TemplateDir is scanned for the same files. if no templates are found the DefaultTemplate is used and if its not set the system 'dies'.
Because so many places are checked for the templates its possible to have one global error handler and have different templates for each virtual host and also allow for defaults. It also means you can have a general catch-all template (allerrors/allerrors.tmpl) as well as single templates (i.e. 500.tmpl). Generally I just use allerrors.tmpl and use TMPL_IF's to display custom content per error message, but you can set it up any way you want.