Skip to main content

HAProxy

Installation

# RedHat 8.3
yum install haproxy

Setting Up HAProxy Logging

The default configuration points to the localhost (127.0.0.1) and local2 is the default facility code used to identify HAProxy log messages under rsyslog.

/etc/rsyslog.d/haproxy.conf

$ModLoad imudp
$UDPServerAddress 127.0.0.1
$UDPServerRun 514
local2.*        /var/log/haproxy/haproxy-traffic.log
local2.notice   /var/log/haproxy/haproxy-admin.log

Create the directories required

mkdir /var/log/haproxy
chown haproxy.haproxy /var/log/haproxy