Rpaf is a software that allows for reverse proxy add forward functionality in backend Apache servers, similar to the functionality provided by mod_proxy_add_forward for frontend Apache servers.
The mod_rpaf software changes the remote address of the client visible to other Apache modules when the two conditions are satisfied. The first condition is that the remote client is defined in httpd.conf as a proxy. The second condition is that there is an incoming X-Forwarded-For header and the proxy is in its list of known proxies. In this scenario, mod_rpaf takes the last IP from the incoming X-Forwarded-For header and changes the remote address of the client in the request structure.
The software also takes the incoming X-Host header and updates the virtualhost settings accordingly. For Apache2 mod_proxy, it takes the X-Forwared-Host header and updates virtualhosts. If the user uses mod_rpaf on the backend server, there is no need to use mod_perl to set the remote_ip of the real client that the user is serving or invent a lot of internal hostnames for the backend server. Mod_rpaf simply works with the same hostnames as the frontend server, using the RPAFsethostname option.
The module configuration of mod_rpaf is quite simple as there are only two directives to set; RPAFenable and RPAFproxy_ips. With the RPAFproxy_ips directive, the user can define the IP's of frontend proxies that send the correct X-Forwarded-For headers. If the user does not use the RPAFproxy_ips directive, the module will not change the remote address of the incoming connection at any time. RPAFsethostname, when enabled, takes the incoming X-Host header and updates virtualhost settings accordingly.
New in version 0.6, users can change which header Apache looks at with the configuration directive RPAFheader, allowing them to switch between X-Forwarded-For and X-Real-IP. There are also bugfixes in this version that make mod_rpaf work correctly with Keep-Alive requests.
The requirements for mod_rpaf are Apache 2.0.x (optional), Apache 1.3 branch (optional), and Apache 2.2.x (optional). The software's installation process requires the user to load the module first with the LoadModule rpaf_module libexec/apache2/mod_rpaf-2.0.so command. The following directives should be set: RPAFenable On, RPAFsethostname On, and RPAFproxy_ips 127.0.0.1 10.0.0.1.
Overall, mod_rpaf is an easy and efficient software to use for reverse proxy add forward functionality.
Version 0.6: N/A