RE: [users@httpd] rewrite gurus help? (with mod_proxy_ajp)

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

 



Hi Pete,

You said that ..... "Rewrite goes into infinite loop" Is that correct ? 

I also faced the same problem. And resolution that is when you are redirecting to some other url that particular url should not be in turn re-directed. Else it's infinite loop.

See this thread : http://mail-archives.apache.org/mod_mbox/httpd-users/200512.mbox/%3cF370ADC0040A424E8AB27D2BCEE35D0C013CC16E@xxxxxxxxxxxxxxxxxxxxxxxxxx%3e

It might help you. 

Cheers,
Rajendra


-----Original Message-----
From: Pete Lamborne [mailto:pete@xxxxxxxxxxx] 
Sent: Tuesday, January 03, 2006 10:10 AM
To: users@xxxxxxxxxxxxxxxx
Subject: Re: [users@httpd] rewrite gurus help? (with mod_proxy_ajp)

Yes I am using 2.2, for the advantages mod_proxy_ajp was supposed to have over mod_jk.  Now I am rethinking that decision...

I will use the logging for more insight, thanks for that tip as well.  I will post any info I find, and appreciate any other suggestions.
pete


Axel-Stéphane SMORGRAV wrote:

>Another advantage of using RewriteRule over ProxyPass is that you get a lot better logging provided you set "RewriteLogLevel 3". That may help you understand why it loops...
>
>I understood that you originally ended up with a redirect, but I thought that it might have been the application that was generating the redirect.
>
>I take it you are using Apache 2.2 ?
>
>-ascs
>
>-----Original Message-----
>From: Pete Lamborne [mailto:pete@xxxxxxxxxxx] 
>Sent: Tuesday, January 03, 2006 6:56 PM
>To: users@xxxxxxxxxxxxxxxx
>Subject: Re: [users@httpd] rewrite gurus help? (with mod_proxy_ajp)
>
>ASCS, thanks for your reply.
>
>Your suggestion (and several permutations of it) were not successful; I don't quite understand why, but it created an infinite loop.
>
>I don't think the original situation (where it *works*, but the URL is rewritten in the user's browser) is due to ProxyPass being evaluated first, because the URL did indeed get rewritten 1st (it's just that it wasn't transparent to the user).
>
>I believe this is more likely to be a bug in the way the mod_proxy_ajp and mod_rewrite interact, rather than a matter of configuration.
>
>But I really appreciate more suggestions and/or workarounds!
>Thanks, pete
>
>
>Axel-Stéphane SMORGRAV wrote:
>
>  
>
>>Could it possibly be because ProxyPass is evaluated before RewriteRule ?
>>
>>How does the following work :
>>
>>RewriteEngine on
>>RewriteRule /pub/wiv/(.*).asx$ 
>>ajp://theTomcatBox:8009/pub/wiv?seoName=$1 [P,QSA] RewriteRule /pub 
>>ajp://theTomcatBox:8009/pub [P] ProxyPassReverse /pub 
>>ajp://theTomcatBox:8009/pub
>>
>>-ascs
>>
>>-----Original Message-----
>>From: Pete Lamborne [mailto:pete@xxxxxxxxxxx]
>>Sent: Monday, January 02, 2006 6:48 PM
>>To: users@xxxxxxxxxxxxxxxx
>>Subject: [users@httpd] rewrite gurus help? (with mod_proxy_ajp)
>>
>>Hey all,
>>There is very little info out there on this so far, given how new 
>>mod_proxy_ajp is.  One post I found seemed to indicate the same bug 
>>with no solution....
>>
>>The problem is that I can't get mod_rewrite to work transparently with 
>>mod_proxy_ajp.  It either doesn't work at all (when I don't specify 
>>:proxy or [P]), or works like a redirect, changing the URL in the 
>>user's browser.
>>
>>Here's a quick conf:
>>
>>RewriteEngine on
>>RewriteRule /pub/wiv/(.*).asx$ /pub/wiv?seoName=$1 [P] ProxyPass /pub 
>>ajp://theTomcatBox:8009/pub ProxyPassReverse /pub 
>>ajp://theTomcatBox:8009/pub
>>
>>Here's something else I tried with the same results:
>>
>>RewriteEngine on
>>RewriteRule /pub/wiv/(.*).asx$ proxy:ajp://dev3:8009/pub/wiv?seoName=$1
>>ProxyPass /pub ajp://theTomcatBox:8009/pub ProxyPassReverse /pub 
>>ajp://theTomcatBox:8009/pub
>>
>>Both of these solutions work, but replace the pretty URL with the ugly 
>>one for the end-user.  I want it to be transparent to the user.
>>
>>What am I missing?
>>
>>
>>
>>---------------------------------------------------------------------
>>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
>>
>>
>>---------------------------------------------------------------------
>>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
>>
>>
>> 
>>
>>    
>>
>
>---------------------------------------------------------------------
>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
>
>
>---------------------------------------------------------------------
>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
>
>
>  
>

---------------------------------------------------------------------
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

---------------------------------------------------------------------
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