Re: mod_rewrite and mod_jk

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



My workers.properties file:

[channel.socket:localhost:8009]
port=8009
host=127.0.0.1

[ajp13:localhost:8009]
channel=channel.socket:localhost:8009

Why does the JkMount look "unusual" to you?  Just the "tomcat"?  That's just
a URL I am using for my testing.  My understanding is that anything URL with
the prefix "/tomcat/*" will be passed to tomcat.

It seems to work fine. Those URLs do end up being handled by tomcat.

-- Greg

On 4/3/2011 3:42 PM, Dirk Schaare wrote:
what about your workers.properties file?

JkMount /tomcat/* ajp13
looks pretty unusual to me

Cheers,
Dirk

On 03.04.2011, at 19:37, Greg Allen wrote:

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:

<VirtualHost 127.0.0.1:80>
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/rewrite.pl
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
</Directory>
</VirtualHost>

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:

127.0.0.1 - - [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"
127.0.0.1 - - [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"
127.0.0.1 - - [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.

Thanks,

-- Greg


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See<URL:http://httpd.apache.org/userslist.html>  for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
  "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx


--
Greg Allen
Calet, LLC
gallen@xxxxxxxxxxx


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
  "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux