标签:
global log 127.0.0.1 local0 log 127.0.0.1 local1 debug maxconn 45000 # Total Max Connections. daemon nbproc 1 # Number of processing cores. defaults log global mode http option httplog option dontlognull retries 3 option redispatch maxconn 20000 timeout server 86400000 timeout connect 86400000 timeout client 86400000 timeout queue 1000s # [HTTP Site Configuration] listen http_web 192.168.10.10:80 mode http balance roundrobin # Load Balancing algorithm option httpchk option forwardfor server server1 192.168.10.100:80 weight 1 maxconn 512 check server server2 192.168.10.101:80 weight 1 maxconn 512 check # [HTTPS Site Configuration] listen https_web 192.168.10.10:443 mode tcp balance source# Load Balancing algorithm reqadd X-Forwarded-Proto:\ http server server1 192.168.10.100:443 weight 1 maxconn 512 check server server2 192.168.10.101:443 weight 1 maxconn 512 check # [Change HAProxy Stats URL] listen stats 192.168.10.10:1936 mode http log global balance roundrobin maxconn 10 clitimeout 100s srvtimeout 100s contimeout 100s timeout queue 100s stats enable stats hide-version stats refresh 30s stats show-node stats realm Haproxy\ Statistics stats auth admin:password stats uri /ha-stats or stats uri /stats
How to intall and configure Haproxy on Centos
标签:
原文地址:http://www.cnblogs.com/Mrhuangrui/p/4600974.html