httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joshua Slive <>
Subject Re: [users@httpd] strange behaviour of mod_vhost_alias
Date Wed, 20 Nov 2002 16:12:41 GMT

On Wed, 20 Nov 2002 wrote:

> On Tue, Nov 19, 2002 at 08:24:41PM -0500, Joshua Slive wrote:
> >
> > I've seen one other report that I recall as being vaguely similar to
> > yours.  Technically, Apache should NEVER use a name-based virtualhost that
> > doesn't have a ServerName/ServerAlias unless it is listed first.  You may
> > have discovered a bug.
> >
> > Does the order of the listing of the <VirtualHost>s matter?  Do you get
> > the same thing with an ordinary DocumentRoot in the second vhost, rather
> > than a VirtualDocumentRoot?
> >
> I just extended my small config to include more <VirtualHosts>. The
> phenomena can be described as following:
> If V_1....V_n   are my VirtualHost-Sections
> As soon as there is a V_a with a VirtualDocumentRoot inside *before*
> (a<b) the V_b with the "canonical" hostname (reverseloopup of IP) as
> ServerName inside then requests for this canonical hostname are
> answered with V_a instead of V_b.

Yes, this is very strange.  It must have something to do with
mod_vhost_alias interfering with virtual-host matching.  As I've
mentioned, apache should not care about the reverse lookup.

Wait a second; one more idea:  Try adding
to the <VirtualHost> section containing the VirtualDocumentRoot.

I think I know what apache is doing.  Since there is no ServerName in that
VirtualHost, apache is doing a reverse lookup on the IP address to supply
the ServerName.  That is why it is catching the canonical name.

That must be the answer.  I don't know why I didn't think of that before.


The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message