I am trying to read the /var/log/haproxy.log
file with the command: clog -f haproxy.log
but nothing happens. No window opens. How do I see my error log? Iām on pfsense.

- 3,793
- 10
- 27
- 36

- 11
- 1
- 5
2 Answers
First you have to activate the logs in the settings.
Services -> HAProxy -> Settings, "Logging" section.
In "Remote syslog host" put /var/run/log
.
Save and apply. Now clog -f /var/log/haproxy.log
you should give you something.

- 36
- 2
-
Thank you very much, it works !!! ā Jean Mark Orfali Nov 27 '20 at 18:08
-
@JeanMarkOrfali please also accept the answer (and upvote). Thanks. ā sebix Oct 13 '22 at 18:24
To be able to enable local logs on HAProxy at pfSense 2.7.0, I had to edit the /etc/defaults/rc.conf
file and change the syslogd_flags
line to allow the syslog to listen on UDP socket as cited on FreeBSD Forums:
syslogd_flags="-s -b localhost -C"
I'd rebooted the system and changed the HAProxy settings to the same as recommended by @DeepBlueMussel and it worked as expected.
You can also check HAProxy logs on pfSense UI (Stats > System Logs > Packages > haproxy).
To display detailed information specific to a particular frontend (eg URLs accessed by the client), enable the "Detailed Log" checkbox in the frontend configuration.

- 115
- 1
- 10