How is this not handled with a Host and Context element?
Apache config:
VirtualHost one.host.com
JkMount /*.jsp AJP13
VirtualHost two.host.com
JkMount /*.jsp AJP13
Tomcat:
Host name="one.host.com"
Context path="" docBase="one"
Host name="two.host.com"
Context path="" docBase="two"
Host one files go in $CATALINA_HOME/webapps/one, host two files go in
$CATALINA_HOME/webapps/two. So then you would have one.host.com/index.jsp
and two.host.com/index.jsp.
I haven't tried this with 4.x, the tomcats I have with virtual hosts are all
3.x and server.xml is quite a bit different, but I don't see why it wouldn't
work, especially with some tweaking.
John
> -----Original Message-----
> From: Anthony Milbourne [mailto:anthony.milbourne@becta.org.uk]
> Sent: Wednesday, September 04, 2002 9:58 AM
> To: 'tomcat-user@jakarta.apache.org'
> Subject: Url Mapping with mod_jk
>
>
> Hi
>
> I know this question was asked in Feb but it didn't seem to
> get a full reply
> back then - so I'm asking again.
>
> I have one instanve of Apache 1.3 talking over mod_jk to one
> instance of
> Tomcat 4.0.4. Apache has 2 virtualhosts set up for the 2
> webapps deployed
> on Tomcat. Both virtualhosts need to have the webapps mapped
> to the root
> url.
>
> Currently I am using directives like:
>
> JkMount /app1/*.jsp ajp13
>
> but this mounts the webapp under the /app1 url. I can't make app1 the
> Tomcat root app as this would also need to be done for app2. With
> mod_webapp you can mount a given webapp under a given URL -
> but I haven't
> seen anything like this for mod_jk. Is it possible with
> mod_jk or do I have
> to kludge it with an apache alias ?
>
> Thanks,
>
> Anthony.
>
> PS - sorry if Outlook has filled this post with HTML.
>
>
> **************************************************************
> *********************
> Becta's new 'Ask an Expert' service provides you with the
> opportunity to consult an online panel of experts for help
> with a whole range of advice on ICT issues, with a different
> theme each month.
> The theme for September's 'Ask an Expert' is Technical
> Enquiries - a specialist panel of experts are available to
> help you with any technical issues that are worrying you -
> there are no restrictions on what you can ask. So whether you
> simply want to know how to connect up your printer, or if you
> need advice on buying ICT equipment and services, our experts
> will be on hand to offer advice and guidance. Find out more at:
> http://www.ictadvice.org.uk/expert
> **************************************************************
> *********************
>
>
> --
> To unsubscribe, e-mail:
<mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail:
<mailto:tomcat-user-help@jakarta.apache.org>
--
To unsubscribe, e-mail: <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-user-help@jakarta.apache.org>
|