Mailing List Archive

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 [ In reply to ]
if your on unix, can you place a soft link in each of the
virtual directories that point to one central location, or
will that mess with security of apache?

George

>-----Original Message-----
>From: Lawrence, Sean [mailto:slawrence@seveninteractive.com]
>Sent: Monday, February 11, 2002 3:19 PM
>To: Apache Users (E-mail)
>Subject: 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 [ In reply to ]
Yeah it looks like that's what I have to do. The only thing that stinks
about that is having to make 3 symlinks:
error docs, css, and one for an images directory. Better than recreating
the files everywhere but not as nice as simply pointing to one area in the
filesystem in the main config.

Thanks,

Sean

-----Original Message-----
From: George Gallen [mailto:ggallen@slackinc.com]
Sent: Monday, February 11, 2002 2:43 PM
To: 'users@httpd.apache.org'
Subject: RE: Single directory of Error Docs for multiple vhosts



if your on unix, can you place a soft link in each of the
virtual directories that point to one central location, or
will that mess with security of apache?

George

>-----Original Message-----
>From: Lawrence, Sean [ mailto:slawrence@seveninteractive.com
<mailto:slawrence@seveninteractive.com> ]
>Sent: Monday, February 11, 2002 3:19 PM
>To: Apache Users (E-mail)
>Subject: 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
<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 [ In reply to ]
> 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
RE: Single directory of Error Docs for multiple vhosts [ In reply to ]
That works fine for the files themselves but any associated css and image
folders need to be present within the original vhost file structure.

-----Original Message-----
From: Joshua Slive [mailto:joshua@slive.ca]
Sent: Monday, February 11, 2002 3:06 PM
To: users@httpd.apache.org
Subject: RE: Single directory of Error Docs for multiple vhosts



> 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

---------------------------------------------------------------------
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 [ In reply to ]
blurp!! n/m relative paths :)

-----Original Message-----
From: Lawrence, Sean
Sent: Monday, February 11, 2002 3:36 PM
To: 'users@httpd.apache.org'
Subject: RE: Single directory of Error Docs for multiple vhosts


That works fine for the files themselves but any associated css and image
folders need to be present within the original vhost file structure.

-----Original Message-----
From: Joshua Slive [mailto:joshua@slive.ca]
Sent: Monday, February 11, 2002 3:06 PM
To: users@httpd.apache.org
Subject: RE: Single directory of Error Docs for multiple vhosts



> 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

---------------------------------------------------------------------
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

---------------------------------------------------------------------
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