Am 22.08.2011 18:54, schrieb Micha Lenk:
> Hi Rüdiger,
> 
> On 08/22/2011 06:39 PM CEST +02:00, "Plüm, Rüdiger, VF-Group" wrote:
>> Sorry, I missed the ServerAlias for the IP in the second virtual host.
>> So, yes in general the second virtual host should be hit.
>> But using IP addresses as Serveralias is quite unusual and in this case
>> the solution is to just reverse the definition of the virtual hosts.
> 
> Yes, an IP address in the HTTP Host header is quite unusual, granted!
> But this is only how I discovered the issue...
> 
> The same problem exists for the following virtual host configuration,
> assuming that v2.test.local has a proper DNS record that resolves to a
> local IP address:
> 
> Listen v2.test.local:80 http
> NameVirtualHost v2.test.local:80
> <VirtualHost v2.test.local:80>
>     ServerName v1.test.local
>     DocumentRoot /srv/v1
> </VirtualHost>
> <VirtualHost v2.test.local:80>
>     ServerName v2.test.local
>     DocumentRoot /srv/v2
> </VirtualHost>
> 
> In this case a HTTP/1.1 request for http://v2.test.local/ is served the
> content from /srv/v1. Again, the problem is, that, if it matches, the
> parameter from VirtualHost seems to override any ServerName or
> ServerAlias directive.

but why the fuck are you using hostnames there especially for "Listen"?

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to