You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by on 2000/04/07 18:54:37 UTC
URL Rewriting in Apache to forward to Tomcat
This is a bit of a cross between Apache and Tomcat, so if I'm in the wrong place, I apologize...
I want to send all requests except for 1 directory to Tomcat, using Apache to serve that other directory.
I have tomcat mounted at /p2 in Apache:
ApJServMount /p2 /root
I am using URL rewriting to rewrite requests to go to that /p2 mount:
RewriteEngine On
RewriteRule ^(.+)$ /p2/$1
(This rewrites everything, I know, but I am just simplifying for this example.)
The rewrite.log file shows an internal redirect
rewrite util/snoop.html -> /p2/util/snoop.html
internal redirect with /p2/util/snoop.html [INTERNAL REDIRECT]
and the request is going through to Tomcat. However, it doesn't seem to get picked up by my default context:
<Context path="" docBase="c:/phoenix/www/www.point2.com" debug="0" reloadable="true" >
</Context>
That is, the page is not handled by my default servlet.
What am I doing wrong? Is there a better way to do this?
Thanks,
j
===========================================================
Jason Collins Phone 306.955.1855
Information Systems Manager Fax 306.955.0471
Point2 Internet Systems www.point2.com
===========================================================
RE: URL Rewriting in Apache to forward to Tomcat
Posted by .
To summarize:
I essentially want to use mod_rewrite to forward all requests in Apache to a servlet. I can't get this to work. A
posting in the Tomcat FAQ says that this is possible, but doesn't go into any details as to how to achieve it.
Any specifics would be appreciated.
Thanks,
j
-----Original Message-----
From: Collins, Jason [mailto:jcollins@point2.com]
Sent: April 7, 2000 10.55a
To: tomcat-user@jakarta.apache.org
Subject: URL Rewriting in Apache to forward to Tomcat
This is a bit of a cross between Apache and Tomcat, so if I'm in the wrong place, I apologize...
I want to send all requests except for 1 directory to Tomcat, using Apache to serve that other directory.
I have tomcat mounted at /p2 in Apache:
ApJServMount /p2 /root
I am using URL rewriting to rewrite requests to go to that /p2 mount:
RewriteEngine On
RewriteRule ^(.+)$ /p2/$1
(This rewrites everything, I know, but I am just simplifying for this example.)
The rewrite.log file shows an internal redirect
rewrite util/snoop.html -> /p2/util/snoop.html
internal redirect with /p2/util/snoop.html [INTERNAL REDIRECT]
and the request is going through to Tomcat. However, it doesn't seem to get picked up by my default context:
<Context path="" docBase="c:/phoenix/www/www.point2.com" debug="0" reloadable="true" >
</Context>
That is, the page is not handled by my default servlet.
What am I doing wrong? Is there a better way to do this?
Thanks,
j
===========================================================
Jason Collins Phone 306.955.1855
Information Systems Manager Fax 306.955.0471
Point2 Internet Systems www.point2.com
===========================================================
--------------------------------------------------------------------------
To unsubscribe, email: tomcat-user-unsubscribe@jakarta.apache.org
For additional commmands, email: tomcat-user-help@jakarta.apache.org