You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by "Ralf S. Engelschall" <rs...@engelschall.com> on 1996/09/18 16:56:32 UTC
Short Hint: Identify the virtual servers
Just FYI, a short hint:
To be able to identify the virtual servers inside an ErrorDocument, I
discovered a nice method:
1. Outside the <VirtualHost ...> sections configure
PassEnv SERVER_DESCR
SetEnv SERVER_DESCR "Main Server"
2. Place in all your <VirtualHost ..> sections something like
ServerName virtualX.corpY.com
SetEnv SERVER_DESCR "The virtual Server for Corp Y"
3. Inside your ErrorDocument do something like:
print "$ENV{'SERVER_NAME'} ($ENV{'SERVER_DESCR'})";
This makes life easier when you configure virtual hosts (even when you use
redirects between them) and a lot of errors occur: With the above you see
which virtual server is it really.
Greetings,
Ralf S. Engelschall
rse@engelschall.com
http://www.engelschall.com/~rse