It was thus said that Sean Conner wrote:
It was thus said that the Great Aaron Todd once stated:
You may prefer to do
<VirtualHost *:80>
# this will be the default host, when people try to access via
# IP address for instance
ServerName www.example.net
DocumentRoot /var/www/somewhere-generic
SetEnv SITE "wrong address"
</VirtualHost>
<VirtualHost *:80>
ServerName a.example.net
DocumentRoot /var/www/common
SetEnv SITE "this is site A"
</VirtualHost>
<VirtualHost *:80>
ServerName b.example.net
DocumentRoot /var/www/common
SetEnv SITE "this is site B"
</VirtualHost>
The first VirtualHost will be used whenever users access your site via
other than "http://a.example.com" or "http://b.example.com" (e.g. by
entering "http://120.10.123.123" - this being the IP address of your server)
The following two sites are what you seem to want : use the same
document directory for both sites (subdomains), but set a variable
differently depending on which way people come in.
In thisa case, I used SetEnv, which sets an environment value for
cgi-bin scripts e.g., but with mod_perl you would use PerlSetVar, and
with PHP something else probably.
---------------------------------------------------------------------
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: [EMAIL PROTECTED]
" from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]