HAProxy - Log host name
-
I have HAProxy 0.59_7 running and logging to syslog-ng 1.15.
I checked the box under the frontend to get detailed logging. Here's a typical log entry:
Aug 13 17:56:40 proxy haproxy[12810]: 54.36.150.50:35514 [13/Aug/2018:17:56:38.301] HTTP Focus_ipvANY/Focus 0/0/0/1770/1770 200 331 - - ---- 2/1/0/1/0 0/0 "GET /robots.txt HTTP/1.1"
I have a number of different subdomains and seeing the host in the log would be helpful - not just the path.
This link describes how to enable host names (among other things) in the logs: https://www.haproxy.com/blog/configure-syslog-ng-to-log-readable-http-url-from-haproxy/
It comes down to adding this line to the frontend config:
capture request header Host len 32How can I do this with pfSense 2.4.3?
-
@aeleus
Use the 'Advanced pass thru' textbox to put that config setting into ? -
@piba said in HAProxy - Log host name:
@aeleus
Use the 'Advanced pass thru' textbox to put that config setting into ?Thanks, Piba!
That works.