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

    HAProxy in front of Apache Proxy

    Scheduled Pinned Locked Moved Cache/Proxy
    2 Posts 1 Posters 666 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.
    • N
      netgate_user_2024
      last edited by

      Hello.
      We use HAProxy for several servers.
      I have it configured to forward traffic on both port 80 and 443 and the servers handle the certificates.

      Recently I added another server which uses an Apache proxy to a service on port 3000. (Zammad Server)

      It is working but I cannot figure out how to forward the client IP addresses to the end service.

      I read about the Proxy Protocol but I'm not sure if that applies here or how to implement it (without effecting the other existing server connections).

      Any advice is appreciated.

      1 Reply Last reply Reply Quote 0
      • N
        netgate_user_2024
        last edited by

        Okay I found the solution.

        In HAProxy backend for the server that is affected you set:

        send-proxy
        

        In the "Per server pass thru" box under Advanced Settings.

        Then in your Apache site config you have to include:

        RemoteIPProxyProtocol On
        

        As well as enabling the mod_remoteip module.

        Hopefully this is helpful to anyone else finding themselves with this type of configuration.

        1 Reply Last reply Reply Quote 0
        • First post
          Last post
        Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.