You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bugs@httpd.apache.org by bu...@apache.org on 2006/01/02 14:48:18 UTC

DO NOT REPLY [Bug 38096] New: - mod_proxy_balancer rewrites "Host:" HTTP headers

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=38096>.
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=38096

           Summary: mod_proxy_balancer rewrites "Host:" HTTP headers
           Product: Apache httpd-2
           Version: 2.2.0
          Platform: Other
        OS/Version: other
            Status: NEW
          Severity: normal
          Priority: P2
         Component: mod_proxy_balancer
        AssignedTo: bugs@httpd.apache.org
        ReportedBy: gmorin@sysif.net


Hello,

I tried the new module mod_proxy_balancer from apache 2.2. last week and I
get a strange behaviour with it. It doesn't conserv the "Host:" header of the
HTTP request when forwarding to the backend servers. Let me illustrate it :

Here is the virtual host configuration of my test :

<VirtualHost *>
    ServerName testlb.spider.xxx
    ErrorLog /var/www2/logs/testlb/error_log
    CustomLog /var/www2/logs/testlb/access_log combined

    ProxyPass / balancer://cluster stickysession=mysessionid nofailover=On
    <Proxy balancer://cluster>
        BalancerMember http://127.0.0.1:8080
    </Proxy>

</VirtualHost>

I run in a terminal "nc -l -p 8080" and then open with my browser the url
"http://testlb.spider.xxx".

That's what I got :

GET / HTTP/1.1
Host: 127.0.0.1:8080
User-Agent: ELinks/0.10.6-1-debian (textmode; Linux 2.6.11.11 i686; 80x35-2)
Accept: */*
Accept-Encoding: gzip
Accept-Language: fr
Max-Forwards: 10
X-Forwarded-For: 192.168.5.242
X-Forwarded-Host: testlb.spider.xxx:80
X-Forwarded-Server: testlb.spider.xxx

That's not what I expected. Most of the load balancer (like pound or haproxy for
example) would send something like :

GET / HTTP/1.1
Host: testlb.spider.xxx

This make possible the use of virtualhosting behind the load balancer.

I know it is not really a 'bug', but it makes this module useless in my
situation, and I think many users will have the same problem.

Perhaps am I wrong ?
Is there something I miss ?

Thank you for your work,

Guillaume Morin

-- 
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: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


DO NOT REPLY [Bug 38096] - mod_proxy_balancer rewrites "Host:" HTTP headers

Posted by bu...@apache.org.
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=38096>.
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=38096


slive@apache.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |NEEDINFO




------- Additional Comments From slive@apache.org  2006-01-04 03:50 -------
Have you tried the ProxyPreserveHost directive?

-- 
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: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


DO NOT REPLY [Bug 38096] - mod_proxy_balancer rewrites "Host:" HTTP headers

Posted by bu...@apache.org.
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=38096>.
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=38096


gmorin@sysif.net changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEEDINFO                    |RESOLVED
         Resolution|                            |INVALID




------- Additional Comments From gmorin@sysif.net  2006-01-04 12:01 -------
No, I didn't try, was just looking to the mod_proxy_balancer documentation. 

It works fine, I'm really sorry for the bother.

Perhaps ProxyPreserveHost could be enabled by default when using
mod_proxy_balancer ?

Guillaume Morin


-- 
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: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org