Re: 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]

 



On 24.05.12 20:13, Alex Bligh wrote:
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).

This was documented feature in 1.3 and 2.0:

The complete list of names in the VirtualHost directive are treated just like a ServerAlias (but are not overridden by any ServerAlias statement) if all names resolve to the same address set. Note that subsequent Listen statements for this vhost will not affect the ports assigned in the address set.

It seems that in 2.2 it should work as you expect. Do you still use 2.0 or does this problem apply in 2.2 too?
(I've checked now and seems it's gone in 2.2)
--
Matus UHLAR - fantomas, uhlar@xxxxxxxxxxx ; http://www.fantomas.sk/
Warning: I wish NOT to receive e-mail advertising to this address.
Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.
The 3 biggets disasters: Hiroshima 45, Tschernobyl 86, Windows 95

---------------------------------------------------------------------
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