tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Mikusa <>
Subject Re: Tomcat Upgrade & Migration Questions
Date Wed, 06 Feb 2013 14:30:45 GMT
On Feb 6, 2013, at 1:24 AM, Kirk Hoganson wrote:

> I am currently in the middle of an upgrade from Apache (2.2)/Tomcat
> (5.5.16) to Apache (2.2)/Tomcat (6.0.24).  The JVM is being upgraded from
> 1.5.0_09-b01 to 1.6.0_22-b22.  The new host servers will be RedHat 6.2.

Why are you upgrading to 6.0.24 & Java 1.6.0_22?  These are already multiple versions
out of date.  Do yourself a favor and upgrade to the latest release of each, which at this
time is 6.0.36 and Java 1.6.0_39.

> I would like to use the default application installation paths used by the
> RPMs.  

I can understand the temptation to do this, but you should really install Tomcat direct from  You'll get the latest version and it's packaged in a way that is
familiar to everyone on this list, which means we can help you with problems. 

> However, I would like the user code base(s) to exist in a separate
> partition.  These servers will be hosting multiple separate java
> applications.  

Not sure what you mean by "code base".  Are you referring to the WAR files for your applications?

If so, those are normally placed into your "webapps" directory.  You can change that directory
by changing the "appBase" attribute of the <Host/> tag.

Or you can place a context file in "conf/<service>/<host>/<appName>.xml"
and use "docBase" to specify the location of your WAR file.  Note, you would only do this
if the path to the WAR file is not inside your "webapps" (i.e. appBase) directory already.

> Currently Apache and Tomcat use mod_jk as the connector.
> I am hoping for some advice that will help me with the server/Tomcat/Apache
> configuration.  I am specifically interested in Tomcat configuration
> advice, or direction.  I would like to get some clarification on the
> following questions:
> How can I configure Tomcat to allow each individual application (JVM) to be
> restarted independently?
>   - We currently do this with separate CATALINA_BASE directories, and
>   separate startup/shutdown scripts.  I’m not sure if that is the cleanest
>   way.

If you need to isolate your applications, i.e. one application per JVM, then this is the way
to go.  It will also allow you to restart your Tomcat servers independently.  It may seem
like a waste of memory, but the overhead of Tomcat is very small so it's not as bad as you
might initially think.

An alternative approach would be to run all of your web apps in one Tomcat instance.  You
could then reload individual applications using the Manager interface or you could undeploy
/ redeploy them.  This will restart your applications, but it's not quite the same as restarting
the Tomcat server.  

What you do depends on your needs.

> What method would best allow Apache to serve static content, and Tomcat to
> server java based dynamic content?
>   - I’m assuming this will depend on the connector used.

The exact configuration to use will depend on how you proxy to your Tomcat server.  That being
said, the general idea is that you keep requests to your static resources from being proxied
to your Tomcat servers.  This then allows Apache HTTPD to service those requests.

This can either be done inclusively, i.e. by mapping only the paths which should be proxied,
or exclusively by proxying everything and specify certain paths that should not be proxied.

With mod_proxy, you use ProxyPass and ProxyPass with an "!" (excludes) at the end of the path.


  ProxyPass /myapp
  ProxyPass /myapp/static !

With mod_jk, you use JkMount and JkUnMount.

> Which connector (mod_jk, mod_proxy_ajp, mod_cluster) should be used?

>   - I have heard conflicting reports about mod_jk being deprecated or not.

This is not true.  There are similarly named projects that you shouldn't use though, like
mod_jk2, mod_jserv and mod_webapp.

>   - I have seen benchmarks with mod_proxy_ajp outperforming mod_jk
>   significantly.

I have not heard this, where did you see these?


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message