Running two tomcat installations one different ports via one apache server and mod_jk.
In apache's httpd.conf
------------------------
<IfModule !mod_jk.c>
LoadModule jk_module "c:/Progra~1/Apache~1/Apache2/modules/mod_jk.so"
</IfModule>
JkWorkersFile "C:/tomcat/conf/workers.properties"
JkLogFile "C:/tomcat/logs/mod_jk_new.log"
JkLogLevel info
JkMount /* ajp13
JkMount /*.jsp ajp13
JkMount /Tomcat2 tomcat2
JkMount /Tomcat2/* tomcat2
JkMount /Tomcat2/*.jsp tomcat2
In server.xml for the second tomcat instance
--------------------------------------------
- Change the SHUTDOWN port to another port that doesnt conflict with the first instance.
- Change the AJP 1.3 Connector port to another that doesnt conflict with the first.
- Set the connector port to something other than 8080, which you want to run your second tomcat from.
In C:/tomcat/conf/workers.properties
------------------------------------
workers.tomcat_home=C:/tomcat
workers.java_home=C:/jdk1.5.0_02
ps=worker.list=ajp13, tomcat2
#first tomcat
worker.ajp13.port=8009
worker.ajp13.host=localhost
worker.ajp13.type=ajp13
worker.ajp13.lbfactor=1
#second tomcat
worker.tomcat2.port=8007
worker.tomcat2.host=localhost
worker.tomcat2.type=ajp13
worker.tomcat2.lbfactor=1
worker.loadbalancer.type=lb
worker.loadbalancer.balanced_workers=ajp13
worker.inprocess.type=jni
worker.inprocess.class_path=$(workers.tomcat_home)$(ps)server$(ps)lib$(ps)catalina.jar
worker.inprocess.cmd_line=start
worker.inprocess.jvm_lib=$(workers.java_home)$(ps)jre$(ps)bin$(ps)server$(ps)jvm.dll
worker.inprocess.stdout=$(workers.tomcat_home)$(ps)logs$(ps)inprocess.stdout
worker.inprocess.stderr=$(workers.tomcat_home)$(ps)logs$(ps)inprocess.stderr
No comments:
Post a Comment