Patch for haproxy (Proxy Protocol) - is this comthing we could add to the base
I've used haproxy as a load balancer for some time with ispconfig and been manually changing the code to make this work.
I wonder if we could add this into the default base so it helps with updates and for those who need the same function can use this as well.
I've changed the master branch with the changes and also do have a version for 3.1.15p2 I can provide a patch file if you would like me to.
I have added this as a server config but could be done per site as well, but as I not needed to do this yet I left it as a server config. if you want me to change this per site let me know and I will be happy to if it helps get this added so I do not have to edit the code each update.
in the server config I added 3 new fields:
- Checkbox to enable and disable this function
- HTTP port
- HTTPS port
as my setup, I add extra vhost with a new port 880 and 8443 so I can keep both proxy and non-proxy version of the site up.
as there is a change in apache version how this works I added a check in the vhost template to detect this if running apache version 2.4.30 + it will add "RemoteIPProxyProtocol On" else fall back to the old version of "ProxyProtocol On"
required modules: apache 2.4.30+ a2enmod remoteip apache 2.4.29 or less install apache2-dev Download mod-proxy-protocol from git and install