https://issues.apache.org/bugzilla/show_bug.cgi?id=49347

           Summary: Env vars Server_Name/Http_Host not correct
           Product: Apache httpd-2
           Version: 2.2.15
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: All
        AssignedTo: [email protected]
        ReportedBy: [email protected]


So I have a few name based virtual hosts

one.example.com is the _default_, no aliases
two.example.com is aliased as a,c.example.com

In 1.3.42 if you go to b.example.com and print the environment
SERVER_NAME = one.example.com
HTTP_HOST = b.example.com
This to me is the correct behavior

In 1.3.42 if you go to a.example.com and print the environment 
SERVER_NAME = a.example.com
HTTP_HOST = a.example.com

to me, the server name should be two.example.com even though a.example.com is
an alias of two.example.com since TWO is the actual configured "ServerName."

In Apache 2.2.15, it's all thrown out the window, go to b.example.com which
drops to the _default_ (one.example.com) but I see when looking at the
environment

SERVER_NAME = b.example.com
HTTP_HOST = b.example.com

That cannot be correct since that hostname is not even configured.
Why have the two if they are always going to be whatever hostname the request
came in on? 

Even in 1.3.42, if I want to script around this to serve different content
depending on if hostname matches server name or not, it is fine unless the name
has been aliased (a.example.com or c.example.com). It is never fine in 2.2.15.

IMHO, SERVER_NAME should always be whatever the configured ServerName is for
any particular host regardless of the aliases.

I have not tried 2.0.63 nor Trunk to know if the problem exists there or not.

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

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to