----- Original Message ----- From: "Jiansen Niu" <[EMAIL PROTECTED]>
To: <users@tomcat.apache.org>
Sent: Saturday, May 31, 2008 8:35 AM
Subject: apache + mod_jk + two tomcat instance configuration


I have apache2.0 as front end web server, using mod_jk and tomcat 6.0.16
serve Java web applications.
Now, I have couple PHP web applications and one Java Web application. The
Java web application can
be accessed by url www.domain1.com, workers.properties has something like
this:

workers.tomcat_home= /usr/local/apache-tomcat-6.0.16
workers.java_home=/usr/lib/jdk1.6.0_04
ps=/
#List workers
worker.list=worker001
#Define worker001
worker.worker001.port=8009
worker.worker001.host=localhost
worker.worker001.type=ajp13
worker.worker001.lbfactor=1

I want to install  codebeamer (a java webapplication) to my server,
codebeamer use a different version
of tomcat as the one I'm using. I have to use its own tomcat since they
customized it. I changed its
port to 8081, shutdown port to 8006 which are different from my current
tomcat server (8080 and 8005).

My questions is, is it possible, I add another worker in the same
workers.properties file, use different
port number say 8010 and integrates my current Apache web server with
codebeamer's tomcat, so I
can access it by www.domain1.com/codebeamer? If possible what I should do
with this line in
workers.properties:

workers.tomcat_home= /usr/local/apache-tomcat-6.0.16


Jiansen, Yes I think so
Something like this

worker.list=worker1,worker2
# Set WORKER1
worker.worker1.port=8009
worker.worker1.host=machine1domain
worker.worker1.type=ajp13
# Set WORKER2
worker.worker2.port=9009
worker.worker2.host=machine2domain
worker.worker2.type=ajp13

The host can just be machine domain names, doesnt have to be the full dns domain name

Then in the jk file

<IfModule !mod_jk.c>
 LoadModule jk_module "/path to/Apache2.2/modules/mod_jk.so"
</IfModule>

# the path to files
JkWorkersFile conf/jk/workers.properties
JkLogFile conf/jk/mod_jk.log

JkLogLevel info

JkLogStampFormat "[%a %b %d %H:%M:%S %Y]"
JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
JkRequestLogFormat "%w %V %T"

# Then heres the link up between workers and servlets/jsps

   JkMount /thewebapp/theservletorjsp  worker1
   JkMount /thewebapp_othermachine/theservletorjsp  worker2

Connectors and Apache config you have done already....

If you add this to workers in the same way

# Set STATUS MONITORING
worker.jkstatus.type=status

and this to jk

JkMount /jkstatus jkstatus

then you will also see the JK servlet, which help you do stuff, like stop and start workers.

Something like the above... have fun



---------------------------------------------------------------------------
HARBOR : http://www.kewlstuff.co.za/index.htm
The most powerful application server on earth.
The only real POJO Application Server.
See it in Action : http://www.kewlstuff.co.za/cd_tut_swf/whatisejb1.htm
---------------------------------------------------------------------------


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to