On 28.04.2012 16:52, Mike Wilson wrote:
I need to set up a configuration where a site's path space gets distributed over two servers and I'm looking at using mod_jk like this:Apache httpd mod_jk workers.properties workerA -> serverA workerB -> serverB uriworkermap.properties /* = serverA /path2/* = serverB /path3/* = serverB /path3/xyz/* = serverA F ex "/" and "/path1/" would be directed to serverA and "/path2/" would be directed to serverB. This is all fine. But how do I best solve the issue with each server setting its own JSESSIONID? The browser client will see one site with one domain and one JSESSIONID cookie, so this will cause interference between the two servers when switching between pages. Does mod_jk offer any feature to solve this, or is my best bet to change the name of the JSESSIONID cookie on one of the servers?
No, there's no builtin feature for that in mod_jk. You could try to fiddle around with the Set-Cookie and Cookie headers using mod_headers. I suggest using a backend feature to switch cookie name there.
Note that the client should also respect the path when choosing the correct cookie in case multiple cookies match the server. I'd hope the longest path wins in case there are multuple matching paths. Did you test, whether there's actually a problem with those cookies?
Just in case: you can log the cookies in the server access log for debugging purposes by adding %{Set-Cookie}o and %{Cookie}i to your LogFormat in Apache.
Regards, Rainer --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
