httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r..@engelschall.com (Ralf S. Engelschall)
Subject Short Hint: Identify the virtual servers
Date Wed, 18 Sep 1996 14:56:32 GMT

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

Mime
View raw message