tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dan Beaulieu" <>
Subject RE: [Apache2.2.4/modjk/Tomcat6.0.13] redirect url problem
Date Tue, 24 Jul 2007 21:26:27 GMT
Yes, that's what I have been playing around with. This is the very bottom of
my httpd.conf:

JkWorkersFile "C:/Program Files/Apache2/conf/"
JkShmFile     "C:/Program Files/Apache2/logs/mod_jk.shm"
JkLogFile     "C:/Program Files/Apache2/logs/mod_jk.log"
JkLogLevel    debug
JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "
jkMount  /myApp/* worker1

<IfModule rewrite_module>
  RewriteEngine on
  RewriteLog "C:\Program Files\Apache2\logs\rewrite.txt"
  RewriteLogLevel 9
  RewriteRule ^/demo/(.*)$ https://localhost/$1 [PT,NE,NC]
  #RewriteRule ^/demo/(.*)$ /$1 [PT,NE,NC]

I've tried both those rewrite rules, and with the R flag included, no go.
Nothing is getting written to the rewrite.txt log either, it DOES exist
though. Only thing I am getting is "client denied by server configuration:
C:/Program Files/Apache2/htdocs/demo" when I try to visit
"https://localhost/demo/myApp/login.html" in my error_log. I have no idea
how htdocs is getting used as I've modified my DocumentRoot to point
elsewhere...(Not that that's what I want to use anyway)

I am also loading mod_jk before mod_rewrite, as I've seen that the load
order has caused problems for some people.

-----Original Message-----
From: Rainer Jung [] 
Sent: Tuesday, July 24, 2007 4:42 PM
To: Tomcat Users List
Subject: Re: [Apache2.2.4/modjk/Tomcat6.0.13] redirect url problem

You can do this with mod_rewrite. Don't forget to use the PT flag, when 
combining mod_rewrite and mod_jk.

If it doesn't easily work for you:

Add a RewriteLog with a high RewriteLogLevel (e.g. 9) and increase 
JkLogLevel to debug. Then you can follow the manipulation of the URL.



Dan Beaulieu wrote:
> Thank you for the reply, I have played around with mod_rewrite, just can't
> seem to get it going. I will have to dig deeper. 
> The main problem is when we used jserv we did something like this:
> ApJservMount /myApp/servlets /myApp
> ApJservMount /demo/myApp/servlets /myApp
> So myApp was a zone, and they paths would be "mounted" to the same zone
> But now, with mod_jk I can't do:
> jkMount  /myApp/* worker1
> JkMount  /demo/myApp/* worker1
> Because tomcat on the other end will expect two separate contexts:
> <Context path="/myApp" docBase="MyApp" debug="0"
> reloadable="true" />
> <Context path="/demo/MyApp" docBase="myApp" debug="0"
> reloadable="true" />
> Two separate webapps = a session headache.
> Unless I am missing something...

To start a new topic, e-mail:
To unsubscribe, e-mail:
For additional commands, e-mail:

To start a new topic, e-mail:
To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message