[users@httpd] apache2.2 + Tomcat5.5 + mod_proxy_ajp

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

We're running the following: Apache2.2 + Tomcat5.5.17 with mod_proxy,
mod_proxy_ajp and mod_proxy_balancer.

There are virtual servers running sub-domains in each both Tomcat &
Apache.  The balancer configuration is below.

*1st question, are there any obvious gotchas in the config (see below)?

It's working, but we're having the odd problem with sessions the Tomcat
cluster.

When I block cookies (in my browser), the webapp rewrites the URLs to
include jsessionid, but it's lowercase when it appears in the URL and
uppercase in the cookie.  Sometimes the session gets dropped, and a new
one is assigned.

*2nd question, is the value of "stickysession" case sensitive?

It's probably an issue with our tomcat cluster, but I'd like to be able
to rule this out as a potential cause.


Apart from this issue the build/configure routine for Apache/Tomcat
using mod_proxy_ajp as a connector has been much easier to do than with
mod_jk or mod_jk2.

We have been forced to mix ReWrite and ProxyPass directives in order to
achieve what we wanted though, in order to be able to set the additional
parameters (e.g. lbmethod).


Cheers!


p



*** proxy/ajp/balancer config, in each VirtualHost.

ReWriteEngine   on

ProxyPreserveHost On
ProxyRequests   Off
ProxyVia        Off

<Proxy balancer://mycluster>
  BalancerMember ajp://TC1:8009 \
	smax=10 loadfactor=10 route=TCS1
  BalancerMember ajp://TC2:8009 \
	smax=10 loadfactor=10 route=TCS2
</Proxy>

RewriteRule ^\/(.+)\.jsp(.+)? \
  balancer://mycluster/$1.jsp$2 [P,L]

RewriteRule ^\/(.+)\/j_security_check(.+)? \
  balancer://mycluster/$1/j_security_check$2 [P,L]

ProxyPass /favicon.ico    !
ProxyPass /robots.txt     !
ProxyPass /images/*       !
ProxyPass /scripts/*      !

ProxyPass /forms/         balancer://mycluster/forms/ \
	maxattempts=1 lbmethod=bytraffic stickysession=JSESSIONID


---------------------------------------------------------------------
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@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux