httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Greg Allen <>
Subject [users@httpd] mod_rewrite and mod_jk
Date Sun, 03 Apr 2011 17:37:47 GMT
I am trying to use mod_rewrite to rewrite URLs coming into my server and 
have the resulting value from mod_rewrite processed by mod_jk.  Here's 
the relevant section of my httpd.conf file:

DocumentRoot /home/webadmin/localhost/html
SuexecUserGroup webadmin webadmin
ServerAdmin "webadmin@locahost"
ScriptAlias "/cgi-bin/" "/home/webadmin/localhost/cgi-bin/"
CustomLog "/home/webadmin/localhost/access_log" "combined"
ErrorLog "/home/webadmin/localhost/error_log"

RewriteEngine on
RewriteLog /tmp/rewrite.log
RewriteLogLevel 9
RewriteMap map prg:/tmp/
RewriteRule (.*) ${map:$1} [PT]

JkMount /tomcat/* ajp13

LogFormat '"%r" %{outstream}n/%{instream}n (%{ratio}n%%)' deflate
CustomLog "/home/webadmin/localhost/deflate_log" deflate

<Directory /home/webadmin/localhost/html>
Options Includes FollowSymLinks
AllowOverride All

Take this PROFIND request for example: http://localhost/anything/

It comes in and the mapping routine returns /tomcat/.  I would expect 
this to match the JkMount and be forwarded to Tomcat.  That doesn't seem 
to be happening.  You can see the request in my access_log file: - - [03/Apr/2011:12:33:00 -0400] "PROPFIND /anything/ 
HTTP/1.1" 401 954 "-" "DAVKit/4.0 (728.4); iCalendar/1 (42.1); 
iPhone/3.1.2 7D11" - - [03/Apr/2011:12:33:00 -0400] "PROPFIND /anything/ 
HTTP/1.1" 207 1077 "-" "DAVKit/4.0 (728.4); iCalendar/1 (42.1); 
iPhone/3.1.2 7D11" - - [03/Apr/2011:12:33:01 -0400] "PROPFIND / HTTP/1.1" 405 325 
"-" "DAVKit/4.0 (728.4); iCalendar/1 (42.1); iPhone/3.1.2 7D11"

It looks odd. I'm not sure why the first one gets a 401, but the second 
one succeeds (all from my one initial request).  It doesn't appear that 
anything gets forwarded on to tomcat either - I can't find anything in 
any of the tomcat logs that the request was ever sent.

Is what I am trying to do even possible?  If so, what is wrong? I've 
been reading the mod_rewrite and apache docs and can't find anything.


-- Greg

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message