tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mel Martinez <>
Subject apache Alias&Rewrites vs tomcat?
Date Tue, 13 Feb 2001 22:11:08 GMT
I'm trying to assertain just how Apache and Tomcat
interact regarding aliases and rewrites.

I'm using Apache 1.3.14 and tomcat 3.2.1 with
mod_jk.c.  I don't know if the latter is the 'latest'

If I have apache configured to apply an alias or a
rewrite rule to a reqest, I can tell from the logs
that it is indeed getting applied:

 (2) init rewrite engine with requested uri
 (3) applying pattern '^/myapp/(.*)/common/(.*)' to
uri '/myapp/folder1/common/mypage.jsp'
 (2) rewrite /myapp/folder1/common/mypage.jsp ->
 (2) local path result: /myapp/common/mypage.jsp
 (1) go-ahead with /myapp/common/mypage.jsp [OK]

The idea here is simple: the request


should result in a request for


The rewrite rule works great.  This works great for
static stuff served up by Apache.

The problem is that Tomcat is not getting the
translated request, it is getting the original one. 
Since no file in that path actually exists, naturally
it returns a file not found error.

Could someone please tell me if this behavior is
correct or if this is a bug in mod_jk?  Should I be
using apj13? (I just noticed that the mod_jk.conf-auto
has the contexts mounted to apj12 so I'll try changing

I seem to recall that JServ obeyed the results of
rewrites.  Should I try using tomcat with mod_jserv? 
'Would seem like walking backwards...

Please help clear this up so I don't spend too much
more time banging my head against this.



Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail - only $35 
a year!

View raw message