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 Tue, 19 Nov 2002 00:45:22 GMT

On Tue, 19 Nov 2002 wrote:
> All these <VirtualHost>-Sections are identical and all works but the
> one using "" (where apache tries to access
> "/data/apache/") As soon as I outcomment the first
> section (specifying the VirtualDocumentRoot) it works for
> also !!
> Thats strange.
> Another things I dont understand:
> If I dont put the section that specifies the VirtualDocumentRoot as
> first, but any other then the VirtualDocumenRoot-statement is ignored
> and the DocumentRoot from the first section is taken instead.

You need to carefully read
to understand how matching works in name-based virtual hosts.

Summary: Apache looks at the ServerName and ServerAlias inside each
virtual-host block.  If it finds one that matches the Host: header sent by
the client, that is the block it uses.  If it can't find any match, it
uses the first listed virtual host.


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