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]

 



Hi, all:
    I want to use mod_rewrite to modify some url and pass it to backend servers。And the following is my config。

<VirtualHost *:1380>
    ServerName www.mysite.com
   
    AddOutputFilterByType DEFLATE text/html text/css application/x-_javascript_

    ProxyPass /balancer-manager !
    ProxyPass /yui !
    ProxyPass /img !
    ProxyPass /js !
    ProxyPass /css !
    ProxyPass / balancer://jycluster/
    ProxyPassReverse / balancer://jycluster/
    <Proxy balancer://jycluster>
        BalancerMember http://127.0.0.1:8080 min=10 smax=15 max=20
        BalancerMember http://127.0.0.1:8081 min=10 smax=15 max=20
    </Proxy>

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


When I access http://www.mysite.com/balancer-manager, the following error page returned.

Proxy Error

The proxy server received an invalid response from an upstream server.
The proxy server could not handle the request GET /balancer-manager.

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

Why there is a DNS lookup? And How can I modify my config to fix it?

Thanks.

[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