-
1. Re: Override proxy decision with parameter
jfclere Oct 14, 2013 5:02 AM (in response to pavel.orehov)Use mod_rewrite for that.
-
2. Re: Override proxy decision with parameter
pavel.orehov Oct 14, 2013 5:23 AM (in response to jfclere)If I understand correctly using mod_rewrite, configuration would have to be updated for any cluster setup change, for example, if /test context moved from Tomcat 2 to Tomcat 3.
Is there is solution with mod_rewrite or any other which would not require configuration changes when a context moved from one Tomcat instance to another ?
And assuming that mod_rewrite is the only solution, will client be still proxied or will be redirected ?
Thanks,
Pavel
-
3. Re: Override proxy decision with parameter
rhusar Oct 14, 2013 8:59 AM (in response to pavel.orehov)I think I see what you are looking for exactly, but I don't think there is a straightforward way to configure that.
But to turn it the other way, always deploy a the specific context only on one server (you would need to break that from the existing webapp), rewrite existing URL to the new context. In AS5 you could do that by HA singleton deployer.
-
4. Re: Override proxy decision with parameter
jfclere Oct 15, 2013 2:52 AM (in response to rhusar)A RewriteMap could limit the changes to a file ouside the httpd.conf
-
5. Re: Override proxy decision with parameter
pavel.orehov Oct 16, 2013 7:15 AM (in response to jfclere)This configuration in httpd.conf works great:
RewriteEngine on
RewriteCond %{QUERY_STRING} ajp-port=(.*)
RewriteRule ^(.*)$ ajp://%{SERVER_ADDR}:%1%{REQUEST_URI} [P,QSA,L]
Then in URL I need to specify AJP port as parameter, e.g.:
https://hostname:8443/myapp?ajp-port=8609
I know the AJP port since I define the port in our cluster management application.