apache2代理平衡器传递给单个成员

时间:2014-05-30 17:57:11

标签: apache mod-proxy proxypass

我在将urls / api和/ admin传递给单个应用服务器10.10.0.56时遇到问题。它仍然会像所有其他请求一样获得负载均衡(并且失败一半的时间)。不知道发生了什么。

<Proxy balancer://stagecluster>
       BalancerMember http://10.10.0.56 loadfactor=5
       BalancerMember http://10.10.0.57 loadfactor=5
</Proxy>

<VirtualHost _default_:80>
ServerName stage.mydomain.com

<Location /server-status>
    SetHandler server-status
    Order deny,allow
    Deny from all
    Allow from 10.10.0.111
</Location>

ProxyPass /server-status !

RewriteEngine On
RewriteCond %{SERVER_PORT} ^80$
RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L]

ProxyPass /admin http://10.10.0.56/admin
ProxyPassReverse /admin http://10.10.0.56/admin

ProxyPass /api http://10.10.0.56/api
ProxyPassReverse /api http://10.10.0.56/api

</VirtualHost>

0 个答案:

没有答案