I have 1 machine with two tomcat instance.

tomcat_worker.properties
--------------------------------
worker.list=ajp12_1, ajp12_2

worker.ajp12_1.port=8007
worker.ajp12_1.host=localhost
worker.ajp12_1.type=ajp12
worker.ajp12_1.lbfactor=1

worker.ajp12_2.port=8009
worker.ajp12_2.host=localhost
worker.ajp12_2.type=ajp13
worker.ajp12_2.lbfactor=1
--------------------------------

server1.xml
--------------
        <Connector className="org.apache.tomcat.service.PoolTcpConnector">
            <Parameter name="handler"
       value="org.apache.tomcat.service.connector.Ajp12ConnectionHandler"/>
            <Parameter name="port" value="8007"/>
        </Connector>

server2.xml
--------------
        <Connector className="org.apache.tomcat.service.PoolTcpConnector">
            <Parameter name="handler"
       value="org.apache.tomcat.service.connector.Ajp12ConnectionHandler"/>
            <Parameter name="port" value="8009"/>
        </Connector>

httpd.conf
----------------
JkMount /*.jsp ajp12_1
JkMount /tomcat_context_name/*.jsp ajp12_1

JkMount /*.jsp ajp12_2
JkMount /tomcat_context_name/*.jsp ajp12_2

that's all. Maybe this example help you.

PD: I'm working on shutdown tomcat problem, always shutdown the instance on
"8007".



----- Original Message -----
From: "Abhijat Thakur" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, September 14, 2001 4:59 PM
Subject: Multiple Tomcat Instances


>
>
> Hi,
>
> I am using apache and Tomcat 3.2.1. I am trying to have two instances of
> tomcat running. I have different server.xml for each tomcat instance.
> server1.xml
> AJP on Port 8007
> server2.xml
> AJP on port 8009
>
> I have no problem starting tomcat using the two server.xml files. Every
time
> i start tomcat with one of server.xml files i rename the mod_jk.conf-auto
> and then included the two static files in httpd.conf.I have context "test"
> in server1.xml and context "myapp" in server2.xml.
> When i do http://xxx.com/test or http://xxx.com/myapp i can see the
> index.html page for that context but when i try to run the servlet or the
> jsp for those context then it does work.
>
> How do i tell apache as to which context is to be serverd by which port or
> tomcat instance. I checked the archives and somebody was mentioning about
> adding new workers in worker.properties file to direct requests to  the
> different tomcats/jvms.I think i am missing this or some other step but do
> not know how to do it? Please advise.
>
>
> Thanks a lot
>
>
> Abhijat Thakur
>
> bDNA Corporation
>
>

Reply via email to