I am trying to configure Apache 2 with mod_jk2 to talk to two different JBoss 3.0.6 (with Jetty) instances on different machines. My attempts so far don't work, because it seems that jk2 send requests for certain webapps to the wrong jboss instance. Which requests it gets wrong seems to be dependant on the order that I list the apps in workers2.properties. With the configuration below, app2 goes to the wrong machine, but the rest go where they are supposed to.
More details:
I have four webapps deployed as war files across 2 jboss instances - two apps on one instance, the other two on the other instance. app1 is the site's front page, so it is mapped just to /. app2 and app3 are struts based, so they get *.do and *.jsp requests that are under the context that they are mapped to. app4 has a few uris under its context mapped to a servlet, so I list those mappings explicitly.
app1 and app2 are on the first jboss machine, kronos, and app3 and app4 are on the second machine, silas.
So, instead of getting:
app1 -> kronos
app2 -> kronos
app3 -> silas
app4 -> silas
I'm getting
app1 -> kronos
app2 -> silas
app3 -> silas
app4 -> silas
My workers2.properties file:
[logger.apache2]
level=DEBUG
[shm]
file=${serverRoot}/logs/shm.file
size=1048576
[channel.socket:kronos:8009]
port=8009
host=kronos
[channel.socket:silas:8009]
port=8009
host=silas
[uri:/]
worker=ajp13:kronos:8009
[uri:/app2/*.do]
worker=ajp13:kronos:8009
[uri:/app2/*.jsp]
worker=ajp13:kronos:8009
[uri:/app3/*.do]
worker=ajp13:silas:8009
[uri:/app3/*.jsp]
worker=ajp13:silas:8009
[uri:/app4/]
worker=ajp13:silas:8009
[uri:/app4/one]
worker=ajp13:silas:8009
[uri:/app4/two]
worker=ajp13:silas:8009
[uri:/app4/three]
worker=ajp13:silas:8009