一、haproxy日志配置
1.在server2下haproxy的配置文件中添加回环
vi /etc/haproxy/haproxy.cfg ##修改配置文件 systemctl restart haproxy
2.修改日志配置文件
vi /etc/rsyslog.conf # Provides UDP syslog reception 解开如图所示的两行注释 ##接受haproxy日志 # Log anything (except mail) of level info or higher. # Don't log private authentication messages! ##多添加haproxy日志 *.info;mail.none;authpriv.none;cron.none;local2.none /var/log/messages # Save boot messages also to boot.log local7.* /var/log/boot.log local2.* /var/log/haproxy.log ##添加local2,日志文件位置 ---------------------------------------------------------------------------------- systemctl restart rsyslog