You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Dean Gaudet <dg...@hotwired.com> on 1996/11/18 07:21:57 UTC
vhost problems again
Do some people still have mysterious vhost problems? I just ran into
one in hotwired's configuration that others may be seeing too. It's
not something I think we need to fix for 1.2, but I intend on working
on an overhaul of this code for 2.0. Here's the problem.
If you have a global ServerName setting, and you also have a
<VirtualHost> that explicitly describes the same server (i.e. same
ServerName, or overlapping IP) then the VirtualHost is considered a
name-vhost (i.e. is_virtual == 2).
Now, I can't think of when this would really hurt people, but it affected
hotwired because we use the 255.255.255.255 "default" ip address.
The name-vhost (in this case it was www.hotwired.com) is never matched,
and the default is always used. (Our default is essentially the same
config as www.hotwired.com with a tweak to stop robots from indexing it.)
My solution was to remove the global "ServerName www.hotwired.com"
setting; which wasn't needed anyhow since all the VirtualHosts have
their own setting. But in general, the default and name-vhosts
don't mix.
Dean