haproxy最简配置
globallog 127.0.0.1 local2 info
pidfile /var/run/haproxy.pid
chroot /var/lib/haproxy
maxconn 100000
user haproxy
group haproxy
daemon
nbproc 1
defaults
mode http
retries 3
timeout connect 10s
timeout client 50s
timeout server 50s
maxconn 10000
listen stats
bind 0.0.0.0:8888
stats enable
stats hide-version
stats refresh 30s
stats uri /haproxy-status
stats authhaproxy:haproxy
frontend frontend_www
bind 192.168.1.60:80
default_backend backend_www
backend backend_www
option forwardfor
option httpchk HEAD / HTTP/1.0
balance source
server www1 192.168.1.198:80 check inter 2000 rise 30 fall 15
server www2 192.168.1.52:80 check inter 2000 rise 30 fall 15
页:
[1]