tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joshua Szmajda ...@t-nation.com>
Subject Tomcat, Apache connected in interesting way
Date Tue, 23 Nov 2004 17:43:38 GMT
Hi all,

I run a pretty high traffic site using Tomcat. We've gone through a 
number of configurations in the past, and I wanted to share with you the 
newest setup that we're using. It's a bit unorthodox perhaps, and I was 
wondering if anyone could think of possible problems? It does seem to be 
the fastest and most stable setup we've had yet.

Previously we've used Apache and Tomcat connected through jk1 and jk2. 
Also we've run direct to tomcat's http connector. JK1 was ok, but very 
slow. JK2 was fast (using unixSocket communication), but very buggy and 
crash prone. Tomcat alone was good, but it lacked some advanced apache 
stuff we wanted (Mostly URL Rewriting and good SSL handling).

After reading about the upcoming mod_proxy ajp connector for apache 2.2, 
I had the idea to use stuff that's in the current RHEL apache 2.0 
release to accomplish what I feel to be a similar effect. We've set up 
apache to reverse proxy requests for .jsp and .do (we're using struts) 
to tomcat's standard http connector.
 From the httpd.conf:

 <Proxy *>
  Order deny,allow
  Allow from all
 </Proxy>
 ProxyRequests off

 RewriteEngine on
 RewriteRule ^/$ http://128.121.26.205/index.jsp [P,NC]
 RewriteRule ^/(.*.jsp.*)$ http://128.121.26.205/$1 [P,NC]
 RewriteRule ^/(.*.do.*)$ http://128.121.26.205/$1 [P,NC]

This allows apache to process additional rewriting things (I left them 
out) and also to serve images and other static content. I felt that 
apache would be better at handling static content than tomcat in 
general, so this will be an overall speed improvement.

Anyway, any flaws here I should be aware of? Comments? Thanks!

-Joshua Szmajda

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message