• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login
Netgate Discussion Forum
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login

HAProxy - Log host name

Scheduled Pinned Locked Moved Cache/Proxy
3 Posts 2 Posters 1.4k Views
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A
    aeleus
    last edited by Aug 13, 2018, 11:58 PM

    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 32

    How can I do this with pfSense 2.4.3?

    P 1 Reply Last reply Aug 14, 2018, 12:51 PM Reply Quote 0
    • P
      PiBa @aeleus
      last edited by Aug 14, 2018, 12:51 PM

      @aeleus
      Use the 'Advanced pass thru' textbox to put that config setting into ?

      A 1 Reply Last reply Aug 15, 2018, 1:33 PM Reply Quote 0
      • A
        aeleus @PiBa
        last edited by Aug 15, 2018, 1:33 PM

        @piba said in HAProxy - Log host name:

        @aeleus
        Use the 'Advanced pass thru' textbox to put that config setting into ?

        Thanks, Piba!

        That works.

        1 Reply Last reply Reply Quote 0
        3 out of 3
        • First post
          3/3
          Last post
        Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
          This community forum collects and processes your personal information.
          consent.not_received