You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by "Lawrence, Sean" <sl...@seveninteractive.com> on 2002/02/11 21:19:08 UTC

Single directory of Error Docs for multiple vhosts

Has anyone ever set up Apache to use a single directory of error codes for
multiple VirtualHosts?  I have about 9 vhosts setup and would rather set the
main server config to display the server errors than having to setup several
different directives for so 
many hosts.

I checked the documentation and it doesn't go in to how to do with multiple
hosts and when I've tried it, it doesn't seem to work.

Thanks,

Sean

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


RE: Single directory of Error Docs for multiple vhosts

Posted by Joshua Slive <jo...@slive.ca>.
> From: Lawrence, Sean [mailto:slawrence@seveninteractive.com]

> Has anyone ever set up Apache to use a single directory of error codes for
> multiple VirtualHosts?  I have about 9 vhosts setup and would
> rather set the
> main server config to display the server errors than having to
> setup several
> different directives for so
> many hosts.
>
> I checked the documentation and it doesn't go in to how to do
> with multiple
> hosts and when I've tried it, it doesn't seem to work.

I'm not sure exactly what your question is.  If you define an ErrorDocument
outside the <VirtualHost> container, it will apply to all virtualhosts.  You
just need to be careful that the URL is valid for all hosts.  For example,
the following could be placed outside any vhost section.  The Alias makes
the URL valid for all vhosts:

Alias /errors/ /usr/local/apache/errors/
ErrorDocument 404 /errors/notfound.html

Joshua.


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org