Haproxy 某項目線上配置文檔
- $ cat /usr/local/haproxy/haproxy.cfg
- global
- maxconn 32000
- pidfile /usr/local/haproxy/haproxy.pid
- chroot /usr/local/haproxy
- uid 504
- gid 504
- daemon
- quiet
- nbproc 1
- defaults
- log global
- mode http
- option httplog
- option dontlognull
- retries 3
- #option redispatch
- maxconn 10000
- contimeout 5000
- clitimeout 50000
- srvtimeout 50000
- listen tongji 0.0.0.0:80
- mode http
- option httplog
- option dontlognull
- cookie SERVERID
- balance roundrobin
- option httpchk HEAD /check.html HTTP/1.0
- option forwardfor
- stats uri /haproxy_stats_url
- stats auth admin:password
- errorfile 502 /usr/local/haproxy/html/maintain.html
- errorfile 503 /usr/local/haproxy/html/maintain.html
- errorfile 504 /usr/local/haproxy/html/maintain.html
- server city01 10.10.100.61 cookie city01 check inter 2000 rise 2 fall 3
- server city02 10.10.100.62 cookie city02 check inter 2000 rise 2 fall 3
詳細解釋,請參考這裡.
http://dngood.blog.51cto.com/446195/738634
本文出自 「dongnan」 博客,請務必保留此出處http://dngood.blog.51cto.com/446195/819411
[火星人 ] Haproxy 線上配置文檔已經有272次圍觀