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]

 



> # Listen on 192.200.0.1, 192.200.0.2, 192.200.0.3
> Listen *:80
> Listen *:1234 # <--- config for this not omitted below
>
> NameVirtualHost 192.200.0.1:80
>
> <VirtualHost 192.200.0.1:80>  # <--- *** THIS LINE ***
> ServerName will-not-resolve.example.com:80 # port no included as per docs
> # Default vhost for things that resolve to 192.200.0.1
> </VirtualHost>
>
> <VirtualHost 192.200.0.1:80>
> ServerName a.web.site.example.com:80 # port no included as per docs
> # VHost for http://a.web.site.example.com/
> </VirtualHost>
>
> <VirtualHost 192.200.0.1:80>
> ServerName 192.200.0.1:80  # port no included as per docs
> # VHost for http://192.200.0.1/
> </VirtualHost>
>
> # 192.200.0.2
> <VirtualHost 192.200.0.2:80>
>  # IP based Virtual Host goes here on 192.200.0.2
> </VirtualHost>

This config can avoid the problematic behavior by s/<VirtualHost
192.200.0.1:80>/<VirtualHost *:80> and letting normal name-based
resolution take over for everything other than 192.200.0.2.

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