修改配置
nano /etc/haproxy/haproxy.cfg
配置1:
https://github.com/woniu336/open_shell/blob/main/haproxy/001.cfg
配置2:
https://github.com/woniu336/open_shell/blob/main/haproxy/002.cfg
配置3:
https://github.com/woniu336/open_shell/blob/main/haproxy/003.cfg
验证
haproxy -c -f /etc/haproxy/haproxy.cfg
重启
systemctl restart haproxy
检查状态
systemctl status haproxy