John, One of our new admins did just that with apache 2.0.43 and three versions of tomcat 4.1.18, 4.1.24 and 5.0.
your http.conf and workers.properties look like his. I noticed that he listed each tomcat worker in the loadbalancer section and commented out the location of tomcat (see below). I know you state no load balancing but we have not noticed any problems with the wrong tomcat being served up. I will need to need what happens if I have him remove the load balancing references. # Note: # ----> lbfactor must be > 0 # ----> Low lbfactor means less work done by the worker. worker.tcat418.lbfactor=1 worker.tcat5.lbfactor=1 worker.tcat424.lbfactor=1 # # Specify the size of the open connection cache. #worker.ajp13.cachesize # #------ DEFAULT LOAD BALANCER WORKER DEFINITION ---------------------- #--------------------------------------------------------------------- # # # The loadbalancer (type lb) worker perform weighted round-robin # load balancing with sticky sessions. # Note: # ----> If a worker dies, the load balancer will check its state # once in a while. Until then all work is redirected to peer # worker. worker.loadbalancer.type=lb worker.loadbalancer.balanced_workers=tcat418, tcat5, tcat424 # # worker.tomcat_home should point to the location where you # installed tomcat. This is where you have your conf, webapps and lib # directories. # # worker.tomcat_home=/jakarta/tomcat-4.1.18 -----Original Message----- From: John Turner [mailto:[EMAIL PROTECTED] Sent: Monday, March 31, 2003 2:17 PM To: [EMAIL PROTECTED] Subject: Help with one Apache, mod_jk, two Tomcats, no load balancing Hi - I have been tweaking on this all day, with no luck. I am hoping someone here can help me out. Solaris 8 Apache 2.0.44 Mod_jk Tomcat 4.1.18 I would like to assign a Tomcat instance to each Apache virtual host. http://www.host1.com -> Tomcat 1 http://www.host2.com -> Tomcat 2 I have two Tomcat instances setup and working great using CATALINA_HOME and CATALINA_BASE. I have verified this with: http://www.host1.com:8080 -> Tomcat 1 (works great!) http://www.host2.com:8081 -> Tomcat 2 (works great!) So, I proceeded to setup my Apache virtual hosts with mod_jk, and thought everything was fine until I realized that both Apache hosts were using the same Tomcat instance. It's the same webapp, just distinct hostnames. I want separate Tomcat instances so that I can administer (stop/start, etc) them without effecting the other. I believe the problem is workers.properties. I setup two workers, tomcat1 and tomcat2, but no matter what, only tomcat1 gets used. My workers.properties file looks like this: worker.list=tomcat1, tomcat2 worker.tomcat1.port=8009 worker.tomcat1.host=127.0.0.1 worker.tomcat1.type=ajp13 worker.tomcat2.port=9009 worker.tomcat2.host=127.0.0.1 worker.tomcat2.type=ajp13 I've tried various iterations of workers.properties, including removing worker.list, using "localhost" instead of 127.0.0.1, using the FQDN instead of "localhost", using two workers.properties files instead of one, etc. The only results so far are either a 500 Internal Server Error or both Apache virtual hosts end up using the same Tomcat instance. The JkMounts are appropriate: VirtualHost host1 .... JkMount /*.do tomcat1 .... /VirtualHost VirtualHost host2 .... JkMount /*.do tomcat2 .... /VirtualHost Can anyone help me out? What am I missing? This must be possible...I have 22 Tomcat 3.x instances operating behind one Apache with 22 virtual hosts, but that is using mod_jserv. A version of the same configuration but with mod_jk instead has me totally stumped. Do I need to setup load-balancing but somehow restrict one worker to each Tomcat instance? Thanks in advance for any help. John --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
