Apologies, I probably confused you too. See below.

Vickie Troy-McKoy wrote:
...


When I call abc*, it goes to instance1; and when I call xyz*, it goes to instance2.  However, both 
instances have apps that start with "tsa".  How do I configure the apache webserver to 
service the "tsa" app for both tomcat instances?
configure a load balancer (worker) that uses the (other) two workers, in 
addition to the
two workers, and add it to the worker list.
I think that rather than be added to the workers list, the load-balancer worker 
must be the only one in the list.  You then tell the balancer to balance the 
two other workers.
Then the two individual apps won't work, as they're not present on both servers.
Oh. I did not read the OP's requirements carefully enough. Apologies, your instructions were correct for the OP.
---------------------------------------------------
Thank you all for your suggestions.  I tried configuring a load balancer worker; however, 
 I'm getting HTTP 500 messages--Internal Server Error.  I reviewed the reference page; 
however, apparently, I'm missing something.  Also in the mod_jk.log, there's an error 
stating:   "Could not find worker with name 'instance2' in uri map post 
processing".  Any ideas?  Thank you...

On the apache server in httpd.conf, I changed the JKMount statements because I 
wanted to access all content.

 Listen 80
 .
 .
 .
 LoadModule jk_module modules/mod_jk.so

 #
 JkWorkersFile conf/workers.properties
 JkMount /* instance1
 JkMount /* instance2

That is probably not what you want (and the one contradicts the other).
You should probably have instead :

# forward "/abc*" requests to Tomcat "instance1" only
JkMount /abc instance1
JkMount /abc* instance1

# forward "/xyz*" requests to Tomcat "instance2" only
JkMount /xyz instance2
JkMount /xyz* instance2

# forward "/tsa*" requests to either Tomcat, as selected by the balancer worker
JkMount /tsa balance1
JkMount /tsa* balance1

Note: if you really want to forward everything to Tomcat, and it doesn't matter which Tomcat, and you want to let the balancer decide when to forward any request to either Tomcat-1 or Tomcat-2, then just use the single line :
JkMount /* balance1





 In workers.properties, added the load balancer information; it reflects the 
following:

You seem to be missing :

workers.list=instance1,instance2,balance1

(as per Pid's earlier instructions, not as per my erroneous comment)

 worker.balance1.type=lb
 worker.balance1.balance_workers=instance1, instance2  <-- mod_jk may not like 
the space after comma
 #
 worker.instance1.port=8009
 worker.instance1.host=server.xxxx.com
 worker.instance1.type=ajp13
#
 worker.instance2.port=7009
 worker.instance2.host=server.xxxx.com
 worker.instance2.type=ajp13


On the tomcat server (which is the same server), I added the jvmRoute setting 
in server.xml.  For instance one, I added:

     <Engine name="Catalina" defaultHost="localhost" jvmRoute="instance1">

For instance two, I added:   <Engine name="Catalina" defaultHost="localhost" 
jvmRoute="instance2">


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to