HAProxy in front of Apache Proxy
-
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.
-
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.