You are viewing a plain text version of this content. The canonical link for it is here.
Posted to general@jakarta.apache.org by Michael Yuan <ju...@pan.as.utexas.edu> on 2000/03/10 09:23:24 UTC
to mount tomcat / to apache /
Hi folks,
I have setup my apache + tomcat server and it works great! But I can not
figure out a way to mount the tomcat / to the apache / in the ApJServMount
command ...
If I tell server.xml that the "/" is "/webpages", it will come up
correctly when I do "http://host:8080/" (8080 is the tomcat service port
on my computer). But if I do "ApJServMount / /root", the "http://host/"
would still return the "index.html" at apache htdocs directory.
Is there a simple way to mount the tomcat / to apache's / ?
Thanks
Michael
Re: to mount tomcat / to apache /
Posted by Geoff Soutter <ge...@whitewolf.com.au>.
hmm, yes you can use mod_rewrite, but isn't that cheating?
I haven't looked at tomcat source for a while, but this feature (mapping to
/) was pretty broken for standalone 3.0. Hopefully it's fixed for 3.1
(costin?)
As for working with mod_jserv, I remember mod_jserv + jserv didn't support
mapping to /. I wonder if mod_jserv + tomcat does?
geoff
----- Original Message -----
From: "Hannes Wallnöfer" <ha...@helma.at>
To: <ge...@jakarta.apache.org>
Sent: Friday, March 10, 2000 11:48 PM
Subject: Re: to mount tomcat / to apache /
> The Apache mod_rewrite module will do that trick. I've done this with
> with JServ only, but I guess it works the same way with Tomcat.
>
> For example, the following in httpd.conf will pass through /*.html,
> /images/* and /static/* to the filesystem, but handle everything else by
> a servlet mounted as /engine/helmaorg.
>
> RewriteEngine on
> RewriteRule ^/(.*\.html)$ /$1 [L]
> RewriteRule ^/images(.*) /images$1 [L]
> RewriteRule ^/static(.*) /static$1 [L]
> RewriteRule ^/(.*) /engine/helmaorg/$1 [PT]
>
> You can find more on mod_rewrite at
> http://www.apache.org/docs/mod/mod_rewrite.html and
> http://www.apache.org/docs/misc/rewriteguide.html
>
> Hannes
>
> Michael Yuan wrote:
> >
> > Hi folks,
> >
> > I have setup my apache + tomcat server and it works great! But I can not
> > figure out a way to mount the tomcat / to the apache / in the
ApJServMount
> > command ...
> >
> > If I tell server.xml that the "/" is "/webpages", it will come up
> > correctly when I do "http://host:8080/" (8080 is the tomcat service port
> > on my computer). But if I do "ApJServMount / /root", the "http://host/"
> > would still return the "index.html" at apache htdocs directory.
> >
> > Is there a simple way to mount the tomcat / to apache's / ?
> >
> > Thanks
> > Michael
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: general-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: general-help@jakarta.apache.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: general-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: general-help@jakarta.apache.org
>
>
Re: to mount tomcat / to apache /
Posted by Hannes Wallnöfer <ha...@helma.at>.
The Apache mod_rewrite module will do that trick. I've done this with
with JServ only, but I guess it works the same way with Tomcat.
For example, the following in httpd.conf will pass through /*.html,
/images/* and /static/* to the filesystem, but handle everything else by
a servlet mounted as /engine/helmaorg.
RewriteEngine on
RewriteRule ^/(.*\.html)$ /$1 [L]
RewriteRule ^/images(.*) /images$1 [L]
RewriteRule ^/static(.*) /static$1 [L]
RewriteRule ^/(.*) /engine/helmaorg/$1 [PT]
You can find more on mod_rewrite at
http://www.apache.org/docs/mod/mod_rewrite.html and
http://www.apache.org/docs/misc/rewriteguide.html
Hannes
Michael Yuan wrote:
>
> Hi folks,
>
> I have setup my apache + tomcat server and it works great! But I can not
> figure out a way to mount the tomcat / to the apache / in the ApJServMount
> command ...
>
> If I tell server.xml that the "/" is "/webpages", it will come up
> correctly when I do "http://host:8080/" (8080 is the tomcat service port
> on my computer). But if I do "ApJServMount / /root", the "http://host/"
> would still return the "index.html" at apache htdocs directory.
>
> Is there a simple way to mount the tomcat / to apache's / ?
>
> Thanks
> Michael
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: general-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: general-help@jakarta.apache.org