You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Graham Smith <gm...@ecs.soton.ac.uk> on 2003/06/03 14:46:45 UTC

mod_jk mapping

Hi,

Quick question about mapping mod_jk requests to webapps. I run the site 
www.xfly.co.uk which has all requests redirected to tomcat via apache 
using mod_jk and a JkMount of /* in the virtual server definition. At 
the minute the web app that this points to has the context /xfly so 
paths have to be of the form:

http://www.xfly.co.uk/xfly/index.html

What I would like is to maintain the webapp as it is but drop the second 
xfly so that I can have urls of the form:

http://www.xfly.co.uk/index.html

Is this possible? I know that I could define a context along the lines of:
<Context path="" docBase="xfly" ... >
and I have done, but that doesn't really solve the multiple webapps in 
one container problem.

Note: At the minute I want to handle all the requests myself in the 
tomcat container and that all pages are dynamically created.

Thanks
Graham


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


Re: mod_jk mapping

Posted by Boris Folgmann <mi...@folgmann.com>.
Graham Smith schrieb:

> <Context path="" docBase="xfly" ... >
> and I have done, but that doesn't really solve the multiple webapps in 
> one container problem.

As far as I know you should use ROOT and not xfly for the directory name
where your webapp is.

Then use this:

JkMount / worker1
JkMount /* worker1
DocumentRoot "/var/tomcat4/webapps/ROOT"


Adjust worker1 and the doc path to your setup.
This solution only forwards all requests to tomcat. I you don't use
container security, it would be even better to let apache serve static
files directly.

cu,
	boris


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