Ok, I'm feeling a bit stupid about this.
I'm trying to setup a simple Apache reverse proxy setup and I'm hitting a wall. I've had this setup working in the past, but now I just don't see whats going wrong. Heres the setup:
Listen 4050
ServerName lb-test
DocumentRoot /www/app
ProxyRequests Off
Header add Set-Cookie "BALANCEID=hej.%{BALANCER_WORKER_ROUTE}e; path=/;" env=BALANCER_ROUTE_CHANGED
<Proxy balancer://cluster>
BalancerMember http://appserver1:4050 route=appserver1
BalancerMember http://appserver2:4050 route=appserver2
Order deny,allow
Allow from all
</Proxy>
ProxyPass /balancer-manager !
ProxyPass / balancer://cluster/ stickysession=BALANCEID
ProxyPassReverse / balancer://cluster/
<Location /balancer-manager>
SetHandler balancer-manager
Order deny,allow
Deny from None
Allow from all
</Location>
I can see in the log with debug turned on that requests are being routed to a balancer member, but what is also happening is that the proxy host url is also being inserted into the header.
From the lb host: curl -I localhost
HTTP/1.1 200 OK
Date: Wed, 11 Apr 2012 17:33:18 GMT
Server: thin 1.3.1 codename Triple Espresso
Content-Type: text/html; charset=utf-8
Via: 1.1 appserver2:4050
Via: 1.1 lb-test
Set-Cookie: BALANCEID=hej.appserver2; path=/;
As you can see both hosts are in the header, which is breaking the application. I would think that hitting localhost:80 would not trigger mod_proxy, right? If I hit localhost:4050, the same thing happens. Anyone know whats going on?
Thanks