A good HOWTO: http://www.ubeans.com/tomcat
John -----Original Message----- From: Abraham Kang [mailto:[EMAIL PROTECTED]] Sent: Monday, January 13, 2003 10:19 PM To: [EMAIL PROTECTED] Subject: Load balancing Tomcat 3.3 from Apache with mod_jk or mod_jserve -- SOLVED Ok, Here is my setup: Redhat 8 Apache 2.0.43 Tomcat 3.3.1 (two instances on same box for testing) Apache Config: ############################################################ //httpd.conf added the following at end of file Include /path/to/your/mod_jk.conf User userThatOwnsStaticFileDirectories Group groupThatOwnsStaticFileDirectories ############################################################# //mod_jk.conf LoadModule jk_module modules/mod_jk.so #AddModule mod_jk.c JkWorkersFile "/path/to/your/workers.properties" JkLogFile "/path/to/your/mod_jk.log" JkLogLevel emerg ####### Static files are served by Apache from alternate directory Alias /webapp/html/ "/home/user/webapp/html/" <Directory "/home/user/webapp/html/"> Options Indexes FollowSymLinks AllowOverride None Order allow,deny Allow from all </Directory> ####### Protect the WEB-INF directory <Location "/*/WEB-INF/*"> AllowOverride None deny from all </Location> ####### Define what Tomcat is responsible for and point it to the loadbalancer worker JkMount /admin loadbalancer JkMount /admin/* loadbalancer JkMount /examples loadbalancer JkMount /examples/* loadbalancer JkMount /abc/servlet loadbalancer JkMount /abc/servlet/* loadbalancer JkMount /*.jsp loadbalancer ######################################################################### //workers.properties ### set you workers.tomcat_home, workers.java_home, adn ps ### Make sure to list all of the workers this is the key worker.list=ajp13_1,ajp13_2,loadbalancer worker.ajp13_1.port=8008 worker.ajp13_1.host=54.2.1.55 worker.ajp13_1.type=ajp13 worker.ajp13_1.lbfactor=1 ### Because I am using Apache 2 worker.ajp13_1.cachesize=10 worker.ajp13_2.port=8009 worker.ajp13_2.host=54.2.1.56 worker.ajp13_2.type=ajp13 worker.ajp13_2.lbfactor=1 ### Because I am using Apache 2 worker.ajp13_2.cachesize=10 worker.loadbalancer.type=lb worker.loadbalancer.balanced_workers=ajp13_1,ajp13_2 ############################################################################ ##### //server.xml -- NO CHANGES //There workers.list does everything for you. I don't know what replaced the <Engine> element Special Thanks to Patrick Lin for helping me solve this. Hope This Helps Someone, Abraham Kang -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.434 / Virus Database: 243 - Release Date: 12/25/2002 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.434 / Virus Database: 243 - Release Date: 12/25/2002 -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
