You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by jo...@dancik.com on 2003/01/17 23:15:43 UTC

Ignore URL Prefix

I'm using Apache + Tomcat 4.1.12.

In addition to Tomcat, my Apache serves static content and other CGI
applications outside of Tomcat.

I've got the standard Tomcat webapps directory structure, like:

jakarta-tomcat-4.1.12
   webapps
      app1
         WEB-INF
            lib
      app2
         WEB-INF
            lib
      etc.

For all my applications and other content in Tomcat, I want to use a single
URL path prefix ("tomcat"), like this:

   http://www.xyz.com/tomcat/app1/...
      or
   http://www.xyz.com/tomcat/app2/...

Everything else without the /tomcat/ prefix is served by Apache outside of
Tomcat.

I've got the following Apache directive in httpd.conf:

   JKMount /tomcat/* ajp13

What do I need in my Tomcat configuration files to get it to ignore the
/tomcat/ in the URL?

Thanks!



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Ignore URL Prefix

Posted by Bill Barker <wb...@wilshire.com>.
Which Apache version are you using?  For Apache 1.3.x+mod_rewrite I could
probably trick it into doing what you want (but I havn't actually tried it
:).  For Apache 2.x, I'm not so sure (without a lot of C code hacking :).

Sordid hacks like what I'm suggesting are almost always not the way to go
:).  In particular, you can expect major problems with relative links to
e.g. image files.  Personally, I would just set up a '/tomcat' Context in
Tomcat and leave it at that.

<jo...@dancik.com> wrote in message
news:OF12373497.44AA115D-ON85256CB1.00778EE4@dancik.com...
> I'm using Apache + Tomcat 4.1.12.
>
> In addition to Tomcat, my Apache serves static content and other CGI
> applications outside of Tomcat.
>
> I've got the standard Tomcat webapps directory structure, like:
>
> jakarta-tomcat-4.1.12
>    webapps
>       app1
>          WEB-INF
>             lib
>       app2
>          WEB-INF
>             lib
>       etc.
>
> For all my applications and other content in Tomcat, I want to use a
single
> URL path prefix ("tomcat"), like this:
>
>    http://www.xyz.com/tomcat/app1/...
>       or
>    http://www.xyz.com/tomcat/app2/...
>
> Everything else without the /tomcat/ prefix is served by Apache outside of
> Tomcat.
>
> I've got the following Apache directive in httpd.conf:
>
>    JKMount /tomcat/* ajp13
>
> What do I need in my Tomcat configuration files to get it to ignore the
> /tomcat/ in the URL?
>
> Thanks!




--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Ignore URL Prefix

Posted by Lajos Moczar <lm...@galatea.com>.
Johnny -

I just had to deal with this exact same problem but could not come up 
with a way other than to define each <Context> with a path set to 
"/tomcat/<appname>".

Lajos


johnny@dancik.com wrote:
> I'm using Apache + Tomcat 4.1.12.
> 
> In addition to Tomcat, my Apache serves static content and other CGI
> applications outside of Tomcat.
> 
> I've got the standard Tomcat webapps directory structure, like:
> 
> jakarta-tomcat-4.1.12
>    webapps
>       app1
>          WEB-INF
>             lib
>       app2
>          WEB-INF
>             lib
>       etc.
> 
> For all my applications and other content in Tomcat, I want to use a single
> URL path prefix ("tomcat"), like this:
> 
>    http://www.xyz.com/tomcat/app1/...
>       or
>    http://www.xyz.com/tomcat/app2/...
> 
> Everything else without the /tomcat/ prefix is served by Apache outside of
> Tomcat.
> 
> I've got the following Apache directive in httpd.conf:
> 
>    JKMount /tomcat/* ajp13
> 
> What do I need in my Tomcat configuration files to get it to ignore the
> /tomcat/ in the URL?
> 
> Thanks!
> 
> 
> 
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
> 
> 


-- 



                    Lajos Moczar
       ----------------------------------------
     Open Source Support, Consulting and Training
       ----------------------------------------
             Cocoon Developer's Handbook
  (www.amazon.com/exec/obidos/tg/detail/-/0672322579)

                    _      _____
                   / \         /
                  /___\      /
                 /     \   /____

      http://www.galatea.com -- powered by AzSSL


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>