Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Search
    • Register
    • Login
    Introducing Netgate Nexus: Multi-Instance Management at Your Fingertips.

    HAProxy - Log host name

    Scheduled Pinned Locked Moved Cache/Proxy
    3 Posts 2 Posters 1.9k Views 2 Watching
    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

      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
      Reply Quote 0
      • P
        PiBa @aeleus
        last edited by

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

        A 1 Reply Last reply
        Reply Quote 0
        • A
          aeleus @PiBa
          last edited by

          @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

          Hello! It looks like you're interested in this conversation, but you don't have an account yet.

          Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

          With your input, this post could be even better 💗

          Register Login
          • First post
            Last post
          Copyright 2026 Rubicon Communications LLC (Netgate). All rights reserved.
          Privacy Policy · Cookie Policy