apache配置负载均衡

apache配置负载均衡:

注:
1、需要3台服务器,1台分发,另2台为实际网站(只需要在分发的服务器上配置)
2、loadfactor为权重
3、balancer-manager为查看负载均衡分配情况

vi /etc/httpd/conf.d/web.conf

ProxyRequests Off
<Proxy balancer://mycluster>
BalancerMember http://10.0.0.3/bugzilla loadfactor=3
BalancerMember http://10.0.0.4/bugzilla loadfactor=1
</Proxy>
ProxyPass /bugzilla balancer://mycluster/

<Location /balancer-manager>
SetHandler balancer-manager
</Location>

:wq

service httpd restart

相关文章
相关标签/搜索