Re: mod_proxy report "DNS lookup failure" when combined mod_proxy and mod_rewrite

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

 



Thanks for your suggestion, Joshua.

Yes, the rule RewriteRule ^/balancer-manager$ /balancer-manager [P,L] makes no sense. I just pick it as an example.

In fact, my rule is like "RewriteRule ^/(.*) /%{ HTTP_REFERER}/$1 [P,L]". But Apache also returns 502 error. So I simplify my rule to "RewriteRule ^/balancer-manager$ /balancer-manager [P,L]" to confirm that the rule itself has no error and the error must occured inside Apache itself.

According to the rewrite log, I found the the url passed to mod_proxy(http://proxy.isoche.com:1380/balancer-manager) is correct. And that why mod_proxy can not return the right result is what I am confused.

Any suggestion? Thanks.

Robert

On Fri, Feb 22, 2008 at 4:27 AM, Joshua Slive <joshua@xxxxxxxx> wrote:
2008/2/20 Robert Balabalame <balabalamerobert@xxxxxxxxx>:

>
>     ProxyPass /balancer-manager !

>     RewriteEngine On
>     RewriteRule ^/balancer-manager$ /balancer-manager [P,L]

>  Reason: DNS lookup failure for: www.mysite.com
> But I can access http://www.mysite.com/balancer-manager successfully if I
> delete the line that contains "RewriteRule ..."

It seems like "DNS lookup failure" may be a red herring. But that
RewriteRule makes no sense. What is it supposed to do? It is proxying
a request back onto itself, which should create an infinite loop.

I don't think you even need that line at all, given that you have the
ProxyPass line above that cancels proxying for that URL. If you need
to cancel some other rewriting, you can use
RewriteRule ^/balancer-manager$ - [L]

Joshua.

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