On 10/29/06, Ruediger Pluem <[EMAIL PROTECTED]> wrote:
> On a related note, our practice with mod_jk is to route only *.jsp,
> /servlet/*, and a few other URL patterns to Tomcat and let Apache handle
> everything else.  We also want to support load balancing with sticky
> sessions, of course.
>
> That combination is pretty easy and straightforward with mod_jk.  It has
> been *baffling* with mod_proxy_ajp.  Perhaps we just haven't spent long
> enough on mod_rewrite, etc, but so far we're not getting anywhere...

How about

RewriteEngine On
RewriteRule ^(.*\.jsp|/servlet/.*)$ balancer://mycluster$1 [P]


<Proxy balancer://mycluster>
ProxySet stickysession=JSESSIONID nofailover=On
BalancerMember ajp://1.2.3.4:8009 route=tomcat1 max=10
BalancerMember ajp://1.2.3.5:8010 route=tomcat2 max=10
</Proxy>

And in tomcat:

Instance1:
<Engine ... jvmRoute="tomcat1">
<Connector port="8009" protocol="AJP/1.3" />

Instance2:
<Engine ... jvmRoute="tomcat2">
<Connector port="8010" protocol="AJP/1.3" />

-B

Reply via email to