tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Fritz Schneider" <Fr...@Peacham.HomeIP.net>
Subject RE: Multiple tomcat instances
Date Fri, 15 Apr 2005 16:39:39 GMT
Steve,

In the Host definition you specify an appBase for the applications directory
(which will have a new ROOT under it), a Valve for the AccessLog, and
whatever else you want to split off. The applications in the appBase
directory will have their own WEB-INFO where you specify Servlet mappings,
etc. The only restriction that I can think of is that the servlets in
WEB-INF/web.xml must have different Servlet-names from those in conf/web.xml

Fritz

-----Original Message-----
From: Kelly, Steve [mailto:Steve.Kelly@commercequest.com] 
Sent: Friday, April 15, 2005 7:41 AM
To: Tomcat Users List
Subject: RE: Multiple tomcat instances

Can you expand a bit more how this would work. I understand how you can
have two domains pointing to the same ip address but how do I split my
logs, servlet mapping and web apps.

Steve.  

-----Original Message-----
From: Fritz Schneider [mailto:Fritz@Peacham.HomeIP.net] 
Sent: 15 April 2005 12:10
To: 'Tomcat Users List'
Subject: RE: Multiple tomcat instances

Another option which uses fewer resources but doesn't provide quite the
same degree of isolation is to run two hosts in the same Catalina
service. If your DNS maps www.mydomain.com and test.mydomain.com to the
same IP address, they can share the same ports. Each one can have its
own logs, Servlet mappings, and set of apps.

Fritz

-----Original Message-----
From: Peter Crowther [mailto:Peter.Crowther@melandra.com]
Sent: Friday, April 15, 2005 2:55 AM
To: Tomcat Users List
Subject: RE: Multiple tomcat instances

> From: Kelly, Steve [mailto:Steve.Kelly@commercequest.com]
> Is it possible to run multiple instances of tomcat on the same server,

> for example to support production and test environments ?

Yes.  I run up to four on this machine - two (one 4.1, one 5.0) are
running as I type this.

Here's a Windows script that works (give or take the HOME path) for
Tomcat 4 and 5.0 - untested on 5.5, but I can't see why it should fail.
The UNIX equivalent is pretty obvious.  Check out CATALINA_HOME - where
Tomcat is installed - versus CATALINA_BASE - where this instance stores
its files.  Note the JAVA_OPTS for increased stack and heap sizes, too;
this line is optional.

C:\cattery is where I store the data for the four instances.

-- snip --
set CATALINA_HOME=C:\Program Files\Apache Group\Tomcat 4.1 set
CATALINA_BASE=c:\cattery\instance1
set JAVA_OPTS=-Xms64m -Xmx256m
cd %CATALINA_HOME%\bin
startup
-- snip --

Under CATALINA_BASE for each instance, you'll need conf, logs, temp,
webapps, and work directories.  The easiest way to create these is to
copy them from CATALINA_HOME.  You'll then need to modify
conf/server.xml to make sure each instance is running on its own ports -
don't forget to change the shutdown port!

Good luck, yell if you have any problems getting this to work.

		- Peter

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


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



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


---------------------------------------------------------------------
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