haproxy编辑本段配置HAProxy
时间:2023-04-03 09:06:01 | 来源:营销百科
时间:2023-04-03 09:06:01 来源:营销百科
haproxy编辑本段配置HAProxy:
vi /usr/local/haproxy/haproxy.cfg n global
n maxconn 5120
n chroot /usr/local/haproxy
n uid 99
n gid 99
n daemon
n quiet
n nbproc 2
n pidfile /usr/local/haproxy/haproxy.pid
n defaults
n log global
n mode http
n option httplog
n option dontlognull
n log 127.0.0.1local3
n retries 3
n option redispatch
n maxconn 2000
n contimeout 5000
n clitimeout 50000
n srvtimeout 50000
n listen webinfo :1080
n mode http
n balance roundrobin
n option httpclose
n option forwardfor
n server phpinfo1 192.168.18.2:10000 check weight 1 minconn 1 maxconn 3 check inter 40000
n server phpinfo2 127.0.0.1:80 check weight 1 minconn 1 maxconn 3 check inter 40000
n listen webmb :1081
n mode http
n balance roundrobin
n option httpclose
n option forwardfor
n server webmb1 192.168.1.91:10000 weight 1 minconn 1 maxconn 3 check inter 40000
n server webmb2 127.0.0.1:10000 weight 1 minconn 1 maxconn 3 check inter 40000
n listen stats :8888
n mode http
n transparent
n stats uri / haproxy-stats
n stats realm Haproxy statistic
n stats auth zhangy:xtajmd