httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Plüm, Rüdiger, VF-Group" <>
Subject RE: With IP address in Host: header ServerName/ServerAlias doesn't work
Date Mon, 22 Aug 2011 16:39:09 GMT

> -----Original Message-----
> From: Micha Lenk [] 
> Sent: Montag, 22. August 2011 18:27
> To:
> Subject: Re: With IP address in Host: header 
> ServerName/ServerAlias doesn't work
> Hi Ruediger,
> On 08/22/2011 06:16 PM CEST +02:00, "Plüm, Rüdiger, VF-Group" wrote:
> > No, this works as designed and documented for ages. I guess 
> your question is better
> > suited for the list.
> Sorry, I disagree. The documentation reads:
>   Now when a request arrives, the server will first check if it is
>   using an IP address that matches the NameVirtualHost. If it is, then
>   it will look at each <VirtualHost> section with a matching 
> IP address
>   and try to find one where the ServerName or ServerAlias matches the
>   requested hostname. If it finds one, then it uses the configuration
>   for that server. If no matching virtual host is found, then 
> the first
>   listed virtual host that matches the IP address will be used.
>   Source:
> In the case I described earlier, *only* the virtual server v2 has a
> ServerName that matches the requested hostname. The last sentence from
> the cited documentation doesn't apply here.

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.



View raw message