You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Henri Gomez <hg...@apache.org> on 2003/04/11 15:49:45 UTC

Re: Mod_jk2 + apache2 mod_rewrite

Ori Tend wrote:
> Sorry to bother the dev list, but I wasn't able to get it answered in
> the user list, after some time.
> 
> I'm using redhat7, tomcat 4.1.18, apache 2.0.43, mod_jk2.
> 
> RewriteRule works perfectly for any urls, except for urls that are
> mapped to tomcat.
> So, RewriteRule for ^\a.jsp$ for example, simply does not happen.
> 
> Any help will be greatly appreciated.

It seems that jk is getting URI before mod_rewrite and don't
pass it later to mod_rewrite.

Could you invert module orders ?

ie: first rewrite, next jk



---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


Re: Mod_jk2 + apache2 mod_rewrite

Posted by Henri Gomez <hg...@apache.org>.
Mladen Turk wrote:
> 
>>-----Original Message-----
>>From: Ori Tend [mailto:ori@fetchbook.info] 
>>Sent: 16. travanj 2003 9:09
>>To: 'Tomcat Developers List'
>>Subject: RE: Mod_jk2 + apache2 mod_rewrite
>>
>>
>>Could it work if I compile apache2 with mod_rewrite (not 
>>shared), and then only LoadModule mod_jk2 ? Maybe that way 
>>mod_rewrite will get precedent over mod_jk2?
>>
> 
> 
> Try playing with:
> ap_hook_translate_name(jk2_translate,NULL,NULL,APR_HOOK_FIRST); 
> change that to:
> ap_hook_translate_name(jk2_translate,NULL,NULL,APR_HOOK_MIDDLE); 
> 
> mod_proxy also has that hook declared as first, so this may be a
> solution.
> On the other hand I'm not so sure how would that impact in general,
> using
> internal subrequesting for mod_jk2.
> List time I've tested that the HOOK_FIRST was need, but the guys are
> changed that
> processing couple of times already, so it may work now.
> You may test that, and give us you results.

It seems to be the right way to investigate for Apache 2.0



---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


RE: Mod_jk2 + apache2 mod_rewrite

Posted by Mladen Turk <mt...@apache.org>.

> -----Original Message-----
> From: Ori Tend [mailto:ori@fetchbook.info] 
> Sent: 16. travanj 2003 9:09
> To: 'Tomcat Developers List'
> Subject: RE: Mod_jk2 + apache2 mod_rewrite
> 
> 
> Could it work if I compile apache2 with mod_rewrite (not 
> shared), and then only LoadModule mod_jk2 ? Maybe that way 
> mod_rewrite will get precedent over mod_jk2?
>

Try playing with:
ap_hook_translate_name(jk2_translate,NULL,NULL,APR_HOOK_FIRST); 
change that to:
ap_hook_translate_name(jk2_translate,NULL,NULL,APR_HOOK_MIDDLE); 

mod_proxy also has that hook declared as first, so this may be a
solution.
On the other hand I'm not so sure how would that impact in general,
using
internal subrequesting for mod_jk2.
List time I've tested that the HOOK_FIRST was need, but the guys are
changed that
processing couple of times already, so it may work now.
You may test that, and give us you results.

MT.



---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


RE: Mod_jk2 + apache2 mod_rewrite

Posted by Ori Tend <or...@fetchbook.info>.
Could it work if I compile apache2 with mod_rewrite (not shared), and
then only LoadModule mod_jk2 ?
Maybe that way mod_rewrite will get precedent over mod_jk2?

-----Original Message-----
From: Henri Gomez [mailto:hgomez@apache.org] 
Sent: Monday, April 14, 2003 1:55 PM
To: Tomcat Developers List
Subject: Re: Mod_jk2 + apache2 mod_rewrite


Ori Tend wrote:
> I tried that already, but with no success-
> Mod_jk2 gets precedence over mod_rewrite, even though I LoadModule 
> mod_rewrite before mod_jk2.

So it's a problem in module URI handling, mod_jk caming first in chain,
before rewrite.

It will need expertise from Apache 2.0 gurus here.



---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


Re: Mod_jk2 + apache2 mod_rewrite

Posted by Henri Gomez <hg...@apache.org>.
Ori Tend wrote:
> I tried that already, but with no success-
> Mod_jk2 gets precedence over mod_rewrite, even though I LoadModule
> mod_rewrite before mod_jk2.

So it's a problem in module URI handling, mod_jk caming first in
chain, before rewrite.

It will need expertise from Apache 2.0 gurus here.



---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


RE: Mod_jk2 + apache2 mod_rewrite

Posted by Ori Tend <or...@fetchbook.info>.
I tried that already, but with no success-
Mod_jk2 gets precedence over mod_rewrite, even though I LoadModule
mod_rewrite before mod_jk2.



-----Original Message-----
From: Henri Gomez [mailto:hgomez@apache.org] 
Sent: Friday, April 11, 2003 3:50 PM
To: Tomcat Developers List
Subject: Re: Mod_jk2 + apache2 mod_rewrite


Ori Tend wrote:
> Sorry to bother the dev list, but I wasn't able to get it answered in 
> the user list, after some time.
> 
> I'm using redhat7, tomcat 4.1.18, apache 2.0.43, mod_jk2.
> 
> RewriteRule works perfectly for any urls, except for urls that are 
> mapped to tomcat. So, RewriteRule for ^\a.jsp$ for example, simply 
> does not happen.
> 
> Any help will be greatly appreciated.

It seems that jk is getting URI before mod_rewrite and don't pass it
later to mod_rewrite.

Could you invert module orders ?

ie: first rewrite, next jk



---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org