View Single Post

  #1 (permalink)  
Old 12-05-2006
rick
 
Posts: n/a
Default mod_jk with keepalives

I'm trying to get keepalives working with mod_jk and mod_rewrite with a
proxy rule. I work in a highly customized environment so I'm limited
in the solutions I can implement and the changes I can make.

I had mod_jk and keepalives working just fine with a mod_rewrite, with
a rule similar to the following,
RewriteRule ^/app1/(.*)$ http://%{SERVER_NAME}/app2/$1 [L,NC,R]

The problem is we have a home grown application that doesn't understand
what to do when it sees a redirect. So even though I can specify the
return code for redirect, like R=$num, I can't use that solution
because the browser still wouldn't know to follow the redirect. So I
could feed it a 200 status, the problem is the browser won't follow the
redirect, so it would just display the page that gave it a 200, telling
it to redirect.

So my thought is to use mod_rewrite with a proxy rule like this,
RewriteRule ^/app1/(.*)$ http://%{SERVER_NAME}/app2/$1 [P]

The problem I'm having is that when I set up that proxy rule,
keepalives stop working on the pages that get sent to tomcat through
mod_jk. I also tried using ProxyPass and ProxyPassReverse but my
keepalives stopped working with those connections too. Does anyone
know of a method that can make this happen where keepalives will
continue to work?