[ILUG] [OT] mod_proxy_ajp Apache and session cookie issues

Giulivo Navigante giulivo.navigante at katamail.com
Fri Jan 25 19:13:10 GMT 2008


AJ McKee wrote:
> 
> --Balance Config
> <Proxy balancer://ajpCluster>
> BalancerMember ajp://localhost:8009 route=node01
> BalancerMember ajp://node02:8009 route=node02
> </Proxy>

take care, the route is appended to the sessionid, why are you appending 
that parameter?

I would also prefer to use "node01" instead of "localhost" in fact ...

> - Proxy Config
> <VirtualHost *:80>
> ServerName www.foo.com
> ServerAlias node01.foo.com

... you should add node01 as serveralias instead of node01.foo.bar (same 
name which is called from the balancer)

> ProxyPass / balancer://ajpBalance/myApp/ stickysession=JSESSIONID|jsessionid nofailover=On lbmethod=byrequests

lbmethod is byrequest by default, you shouldn't need of it

 > ProxyPassReverse / balancer://ajpBalance/myApp/

this isn't needed and could create confusion because you're using AJP 
and not HTTP on the proxy definition

> ProxyPassReverseCookieDomain localhost foo.com

you don't need of this line if you call the machines from the balancer 
with the short name and they've both $name.foo.bar as hostname

> ProxyPassReverseCookiePath /myApp /

this should be fine

> </VirtualHost>

let us know,
I used it before frequently, but without the balancer with apache 2.0
-- 
Giulio Fidente
"What we have done for ourselves alone dies with us;
  what we have done for others and the world remains."



More information about the ILUG mailing list