Haproxy and VirtualHosts

From: Jesse Lovelace <jesse.lovelace#gmail.com>
Date: Sat, 6 Sep 2008 10:22:12 -0400


Hi all,

I'm having a small problem that I can't seem to find an easy answer for.

My setup is:

| Nginx | ->| HAProxy 1.3 | -> | Apache 2.2s |

My problem is that since HAProxy changes the Host header, I can't use Apache's name-based virtual hosts. So, the question is, can I setup HAProxy to not change the Host header when it proxies? This would have a similar net effect to Apache's ProxyPreserveHost directive.

The reason I don't just use multiple ports in apache and have different pools in HAProxy is due to some external constraints that would be very difficult to modify (namely, RightScale's auto-scaling setup). Also, it doesn't seem that Apache will utilize the X-Forwarded-Host header for name-based vhosts.

Any input would be greatly appreciated.

thanks,

jesse Received on 2008/09/06 16:22

This archive was generated by hypermail 2.2.0 : 2008/09/06 16:30 CEST