DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUGĀ·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=40563>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED ANDĀ·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=40563

           Summary: VirtualHost * VS VirtualHost *:80 , and ServerAlias
           Product: Apache httpd-2
           Version: 2.3-HEAD
          Platform: Other
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: mod_vhost_alias
        AssignedTo: [email protected]
        ReportedBy: [EMAIL PROTECTED]


I struggled a bit to determine the exact circumstances, but here goes.

I have two named virtualhosts defined in my httpd-vhosts.conf:

<VirtualHost *>
    ServerName www.domain1.com
    ServerAlias www.domainalias1.com
    DocumentRoot "D:/Web"
</VirtualHost>

<VirtualHost *>
    ServerName www.domain2.com
    DocumentRoot "D:/Web/domain2"
</VirtualHost>

I won't bother with details such as RewriteRules and custom log defs, but you 
get the point. Now, if I use this setup, the second virtualhost does *not* 
work. All requests point to the first host.

If I either remove the ServerAlias line from the first host, or add a 
ServerAlias line to the second one (ServerAlias *.www.domain2.com for example), 
everything works fine.

So as a clear definition: If a ServerAlias is define in only one of your 
VirtualHost blocks, all requests will always point to the first defined 
VirtualHost.

As an appendice, this doesn't happen when using <VirtualHost *:80> instead of 
just <VirtualHost *>. But nowhere in the documentation does it mention the port 
is required on each VirtualHost block if they're all the same as the 
NameVirtualHost *:80 line, so let's assume this isn't normal behavior - am I 
right?

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to