tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ortwin Glück <...@odi.ch>
Subject Re: mod_jk: mounting tomcat instances to subdirectories
Date Thu, 18 Jan 2007 10:10:16 GMT
Just for the record,

My chosen solution is this one:

Listen 81
Listen 82
Listen 83

NameVirtualHost *:80
NameVirtualHost *:81
NameVirtualHost *:82
NameVirtualHost *:83

<VirtualHost *:80>
   ProxyPass /1/app/ http://localhost:81/app/
   ProxyPass /2/app/ http://localhost:82/app/
   ProxyPass /3/app/ http://localhost:83/app/
</VirtualHost>

<VirtualHost *:81>
   JkMount /app/* tomcat1
</VirtualHost>

<VirtualHost *:82>
   JkMount /app/* tomcat2
</VirtualHost>

<VirtualHost *:83>
   JkMount /app/* tomcat3
</VirtualHost>

Thanks to everybody for the help!

Ortwin

Ortwin Glück wrote:
> 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@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message