tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John Niven <>
Subject RE: 2 instance of tomcat within 1 machine
Date Wed, 27 Feb 2002 13:51:42 GMT
Hi Jason, Keith

Attached are 2 copies of my server.xml. One's from D:\Program Files\Apache
Group\jakarta-tomcat-4.0.2\conf, which is down from my CATALINA_HOME.  The
other is from I:\tomcat-servers\server01\conf.  In this 2nd server.sml
you'll notice that I:\tomcat-servers\server01 is set up to be CATALINA_BASE
for that server.

The important parts are highlighted in the 2nd server.xml file:

<Server port="8010" shutdown="SHUTDOWN" debug="0">
<!-- 	server00: 8080 / 8443
	server01: 8081 / 8444
	server02: 8082 / 8445
	server03: 8083 / 8446
	server04: 8084 / 8447
    <!-- Define a non-SSL HTTP/1.1 Connector on port 8080 -->
    <Connector className="org.apache.catalina.connector.http.HttpConnector"
               port="8081" minProcessors="5" maxProcessors="75"
               enableLookups="true" redirectPort="8444"
               acceptCount="10" debug="0" connectionTimeout="60000"/>
    <!-- Note : To disable connection timeouts, set connectionTimeout value 
     to -1 -->
    <Connector className="org.apache.catalina.connector.warp.WarpConnector"
     port="8011" minProcessors="5" maxProcessors="75"
     acceptCount="10" debug="0"/>

I incremented the http connector port and redirect port by 1 for each new
server (as you can see from the server01: xxxx / yyyy list in the comment).
The other ports were all incremented by 5.  I settled on this by
trial-and-error; it works for me but isn't necessarily the best way to do
it.  Sriram Narayanan posted earlier in this thread, and it seemed to me
that he had a better set-up than me, and had managed to cut out bits that I
didn't need (but had left in anyway).  Naturally, I'd welcome suggestions as
to anything I can strip out of my own server.xml files - I'm running Tomcat

One last thing, I've added /bin into my server instances hierarchy.  This is
purely for convenience: I've copied in the startup, shutdown and catalina
scripts, and then edited the catalina script.  (I'm on Windows, *nix users
will need to adapt accordingly).  I've added this to the top of my catalina

rem *** start additions ***
echo "tomcat server01"
@echo off
set CATALINA_BASE=I:\tomcat-servers\server01
set CATALINA_HOME=D:\Program Files\Apache Group\jakarta-tomcat-4.0.2
rem *** end additions ***

Obviously, you'll need to alter CATALINA_BASE for each server instance.

Hope this helps,

John Niven
(Please reply through mailing list)

View raw message