I am setting up HAProxy as a load balancer and I can get it working (it is forwarding requests to backends). However, I cannot get it to log each request to a file. I can see system type messages like this:
Mar 3 19:36:33 rg-staging-balancer haproxy-systemd-wrapper[29244]: haproxy-systemd-wrapper: SIGTERM -> 8750.
Mar 3 19:36:33 rg-staging-balancer haproxy-systemd-wrapper[29244]: haproxy-systemd-wrapper: exit, haproxy RC=0
Mar 3 19:36:33 rg-staging-balancer haproxy-systemd-wrapper[18109]: haproxy-systemd-wrapper: executing /usr/sbin/haproxy -f /etc/haproxy/haproxy.cfg -p /run/haproxy.pid -Ds
but not individual requests. I am running Ubuntu 16.04, HAProxy 1.7.2-1ppa1~xenial with this configuration:
global
log 127.0.0.1 local1 notice
tune.ssl.default-dh-param 2048
defaults
timeout client 10s
timeout server 10s
timeout connect 10s
frontend http
reqadd X-Forwarded-Proto:\ https
maxconn 2000
bind :443 ssl crt /etc/ssl/haproxy.pem
default_backend rails_servers
backend rails_servers
mode http
option httpchk
option forwardfor
server rg_staging 192.168.203.139:80
Any ideas on how to get each request logged?