httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joshua Slive <jos...@slive.ca>
Subject Re: [users@httpd] strange behaviour of mod_vhost_alias
Date Tue, 19 Nov 2002 00:45:22 GMT

On Tue, 19 Nov 2002 pilsl@goldfisch.at wrote:
> All these <VirtualHost>-Sections are identical and all works but the
> one using "goldfisch.at" (where apache tries to access
> "/data/apache/goldfisch.at:80/test") As soon as I outcomment the first
> section (specifying the VirtualDocumentRoot) it works for goldfisch.at
> 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
http://httpd.apache.org/docs-2.0/vhosts/name-based.html
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.

Joshua.


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message