1 反向代理设置
ProxyRequests Off
<Proxy *>
Order deny,allow
Deny from all
Allow from all
</Proxy>
ProxyPass / http://www.baidu.com
ProxyPassReverse / http://www.baidu.com
详情参见apache手册model_proxy模块介绍
2 负载均衡设置
一轮询均衡策略的配置
ProxyPass /test balancer://mycluster
ProxyPassReverse /test balancer://mycluster
<Proxy balancer://mycluster>
BalancerMember http://www.baidu.com
BalancerMember http://www.hao123.com
BalancerMember http://xiaoyblog.sinaapp.com
</Proxy>
#这里用/会和documentRoot产生冲突,影响其他功能不能正常使用,比如下面的监控功能
详见apache手册
3 负载监控
<Location /balancer-manager>
SetHandler balancer-manager
Order Deny,Allow
Deny from all
Allow from all
</Location>
参见apache模块mod_proxy_balancer介绍
4 其他资料推荐
http://blog.csdn.net/ppzlyg/article/details/6157699
转载请注明:小Y » apache反向代理负载均衡测试