Java Mailing List Archive

http://www.junlu.com/

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

Re: mod_jk: mounting tomcat instances to subdirectories

Peter Rossbach

2007-01-18

Replies:

Hmm,

use multiple vhost for your three installations or different webapp
names (/myapp1, /myapp2, /myapp3).
mod_rewrite rewrite the uri before mod_jk handle the request!

Regards
Peter

Am 17.01.2007 um 17:09 schrieb Ortwin Glück:

> 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.