On 23/03/2007, at 8:49 AM, Christopher Schultz wrote:

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

David,

David Harrison wrote:
I wish to map different Apache urls across to specific Tomcat contexts,
for example:
http://app1.example.com/ to TOMCAT/app1.
http://app2.example.com/ to TOMCAT/app2

This should be relatively straightforward.

First, you'll need two Apache httpd virtual hosts configured.

For each virtual host, just use the appropriate JkMount directives to
send URI mappings "perhaps just /" to the proper worker.

The only catch is the URIs themselves. If you want / to map to / app1, it
might be easiest to make "app1" into the ROOT application for that
Tomcat instance, and use two separate Tomcat instances.

Part of this deployment question is getting away with not having to map a fixed ROOT application for the Tomcat server and instead rely on automated .war deployment into distinct contexts.

I believe that using mod_proxy_ajp (instead of mod_jk), you can do this
very easily using something along the lines of

# In VirtualHost app1.example.com
ProxyPass / ajp13://localhost:8080/app1

# In VirtualHost app2.example.com
ProxyPass / ajp13://localhost:8080/app2

I had not heard of mod_proxy_ajp and it does look like it would do what I want when combined with mod_proxy_balancer. The only problem is the production servers are Apache 2.0 and it looks like mod_proxy_ajp has been introduced in versions >2.1 :-(

I only wish that the standard mod_jk module would support such an activity as what is described, I'd prefer to tweak a few JkMount/ workers.properties settings than completely change the entire production environment :-)

Thanks for the information,


David


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to