Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » Apache Tomcat »

mod_jk: mounting tomcat instances to subdirectories

Ortwin Glück

2007-01-17

Replies:

Hi,

I have 3 Tomcat instances, each running a different version of the same
application. The applications all have the same webapp context. The
Tomcats are running on a different machine than the webserver. But all
three Tomcat instances are on the same machine (using different AJP ports).

I want to mount these 3 instances in one Apache webserver under
different subdirectories using mod_jk:

http://myhost.tld/1/myapp/ --> tomcat1
http://myhost.tld/2/myapp/ --> tomcat2
http://myhost.tld/3/myapp/ --> tomcat3

My first naive try was this:

JkMount /1/myapp/* tomcat1
JkMount /2/myapp/* tomcat2
JkMount /3/myapp/* tomcat3

Naturally the leading /1/ must be removed from the URL forwarded to the
Tomcat. I have tried with mod_rewrite with no success (RewriteRule is
ignored in a Location directive). I don't think that this setup is
something rare. I am looking for a viable solution.

Ortwin

--
[web] http://www.odi.ch/
[blog] http://www.odi.ch/weblog/
[pgp] key 0x81CF3416
    finger print F2B1 B21F F056 D53E 5D79 A5AF 02BE 70F5 81CF 3416

---------------------------------------------------------------------
To start a new topic, e-mail: users@(protected)
To unsubscribe, e-mail: users-unsubscribe@(protected)
For additional commands, e-mail: users-help@(protected)

©2008 junlu.com - Jax Systems, LLC, U.S.A.