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
Have you tried the ProxyPreserveHost directive?
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