httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joshua Slive <>
Subject Re: [users@httpd] **Virtual hosts question**
Date Wed, 04 Jun 2003 00:34:07 GMT

On Tue, 3 Jun 2003, DuSTiN KRySaK wrote:
> My hostnames which work fine if I drop the first:
> <VirtualHost *>
>     DocumentRoot /var/www/html
> </VirtualHost>
> But I had added that because I wanted any http requests by IP, etc to come
> to the main site ( Now with that entry in there all site
> requests are going to the default site.....

This is actually a tricky one.  Luckily, I worked through this problem
with someone else before, so I know the answer:
ServerName blah.blah.blah
to the first <VirtualHost> section (or "ServerName your.ip.address" if you

If you don't have a servername, apache performs a reverse-lookup on your
IP address to find one.  This is probably giving it, which
causes the first vhost to catch all the requests.

This is a case where the dual-use of ServerName (vhost matching and
canonical identification) causes a bit of unnecessary confusion.


The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message