Should name based virtual hosts work when the ServerName is an IP address?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



If I have a configuration like this:

NameVirtualHost 192.200.0.1:80
<VirtualHost 192.200.0.1:80>
       ServerName default.example.com
... stuff ...
</VirtualHost>
<VirtualHost 192.200.0.1:80>
       ServerName a.example.com
... stuff ...
</VirtualHost>

then http://a.example.com/ will return the second site (correctly), not the
default site.

If I use an IP address as the name of the second site like this:

NameVirtualHost 192.200.0.1:80
<VirtualHost 192.200.0.1:80>
       ServerName default.example.com
... stuff ...
</VirtualHost>
<VirtualHost 192.200.0.1:80>
       ServerName 192.200.0.1
... stuff ...
</VirtualHost>

the I would expect http://192.200.0.1/ to return the second site, not
the default site. However, it seems to return the default.

Is this a bug, and is there any work around? (I want the default site
to be there still).

--
Alex Bligh

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux