I'm trying to setup PROXY protocol between a HAproxy acting as a load-balancer (tcp mode) and httpd (2.4.6)running behind. The objective is to get the "real" client IP addresses on the httpd-side.
In haproxy.conf the keyword send-proxy has been put in the selected backend.
The line:
LoadModule remoteip_module modules/mod_remoteip.so
has been added to httpd config file.
The directive RemoteIPProtocolAddress On has been set in the httpd virtualhost configuration file.
However, when reloading/restarting httpd the following errors appears:
[root@XXXXXXXXX conf.d]# systemctl status httpd
● httpd.service - The Apache HTTP Server
Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: enabled)
Active: failed
[...]
Invalid command 'RemoteIPProxyProtocol', perhaps misspelled ...
Looking at the mod_remoteip source code for httpd 2.4.6, it appears the directive RemoteIPProxyProtocol does not exist anymore.
I'm not sure to understand how the versioning works. For instance I can see the RemoteIPProxyProtocol directive exists in mod_remoteip 2.4.43 but not in mod_remoteip 2.4.0.
How can I workaround this issue ? E.g. compiling another mod_remoteip version ? Downgrading httpd? Other?
Thanks.
Happened to meet the same problem, and after checking the documentation:
RemoteIPProxyProtocol is only available in httpd 2.4.31 and newer
I'm currently running Apache/2.4.29 on Ubuntu 18.04 and Apache/2.4.41 on Ubuntu 20.04, it works with 2.4.41.