![](https://csdnimg.cn/release/download_crawler_static/88510433/bg5.jpg)
[root@hd1 haproxy]#cd conf
[root@hd1 conf]# cat haproxy.conf
global
chroot /application/haproxy/var/chroot
daemon
group haproxy
user haproxy
log 127.0.0.1:514 local0 info
pidfile /application/haproxy/var/run/haproxy.pid
maxconn 20480
spread-checks 3
# tune.maxaccept 100
# tune.maxpollevents 180
nbproc 1
defaults
log global
mode http
# option httplog
# option dontlognull
retries 3
option redispatch
contimeout 5000
clitimeout 50000
srvtimeout 50000
listen www01 192.168.1.118:80
mode http
no option splice-response
stats enable
stats uri /admin?stats
stats auth proxy:123456
balance roundrobin
option httpclose
option forwardfor
#option httpchk HEAD /checkstatus.html HTTP/1.0
server www01 192.168.1.13:80 check
server www02 192.168.1.14:80 check
修改主用节点和备用节点的 haproxy 的配置文件参数
/application/haproxy/conf/haproxy.conf 将
*:80
改为