You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Adrian Lanning <al...@hotmail.com> on 2004/03/15 03:25:41 UTC

JK2 VirtualHost-relative Location URI mapping

Hi.

Does anyone know how to get Locations in httpd.conf to be relative to the
VirtualHost rather than global?

I can get JK2 working properly by explicitly putting domains in my
workers2.properties file but I'd prefer using mass virtual hosting with jk2
and avoid having to add domains to apache (requiring a restart) whenever I
get a new dynamic-website client.

The problem is that when I use the Location directive to map uri's (say
"/*.htm") to tomcat, that Location maps ALL "/*.htm" requests even though I
put the Location inside a specific VirtualHost.  This wouldn't be a problem
if all I had on the server were dynamic sites but I have static sites on the
server as well.

All tomcat app sites are on one IP while static sites are on other IPs
(that's how I'm doing mass virtual hosting).

I've tried the following configuration

+-------start snip from httpd.conf-------+
# this vhost is default for IP1.  All dynamic content sites use IP1.
<VirtualHost IP1:80>
    ...
        <Location "/*.htm">
                JkUriSet worker ajp13:localhost:8009
        </Location>
</VirtualHost>

# this vhost is default for IP2. All static content sites use IP2.
<VirtualHost IP2:80>
    ... regular static site stuff
</VirtualHost>
+-------end snip from httpd.conf-------+

What ends up happening is that ALL *.htm pages get sent to Tomcat regardless
of what IP the request comes in on.

Am I doing something wrong?  Has anyone done this using JK (1) in case JK2
doesn't support this?  Is this actually a limitation of Apache rather than
JK?

Server Stats:
  RedHat 9.0
  Tomcat 5.0.19 - binary distribution
  JK2 2.0.2 - compiled from source.
  Apache 2.0.48  - compiled apache from source with
                         mod_ssl. Also use php and openssl in
                         case that makes a difference...

Thanks,
Adrian Lanning


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org