You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Upayavira <uv...@upaya.co.uk> on 2004/03/23 08:06:16 UTC

[users@httpd] proxying breaking sessions

Hi all,

I've done a reasonable amount of googling, and searching mail archives, 
but couldn't work this one out:

If I've got Apache proxying to a backend server, like so:

www.domain.com/clientA -> www.domain.com:8080/v1.1/clientA
www.domain.com/clientB -> www.domain.com:8080/v1.2/clientB

If the backend server creates sessions, it will pass them back to the 
user attached to the folder v1.1 or v1.2, and will thus not be 
associated with the root, which the browser is requesting. I can see two 
possible solutions:
1) Get the backend server (Jetty) to create a session mounted on root 
(/) not its mounted directory (v1.x).
2) Have HTTPd rewrite the session path as it comes back to the user.

But I do not know how to do either of these.

Can anyone throw some lignt for me?

 -----

Also, while on this subject, I've achieved the above using mod_rewrite, 
which is a delight to use, so far. But mod_rewrite only provides one way 
proxying (i.e. it doesn't do ProxyPassReverse). Now, my rules seem too 
complex to achieve using ProxyPassReverse itself, so is there any other 
way around this, other than to code my site to not use HTTP redirects 
(which would be a pain)?

To explain the 'too complex for ProxyPassReverse' statement:

www.domain.com/clientA -> www.domain.com:8080/v1.1/clientA
www.domain.com/clientB -> www.domain.com:8080/v1.2/clientB
but also:
www.domain.com/v1.2/clientA -> www.domain.com:8080/v1.2/clientA
www.domain.com/v1.1/clientB -> www.domain.com:8080/v1.1/clientB

So, you cannot, by looking at the RHS domain name, tell what the LHS 
domain name should be. You need to know what rewriting was done on the 
way in.

Thanks for any help.

With best wishes, and thanks for a great product.

Regards, Upayavira





---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org