Install mod_rpaf on CentOS 5, CentOS 6


This is a quick guide on how to install mod_rpaf on CentOS 5 and CentOS 6. (This guide can also be used to install mod_rpaf on RHEL and Fedora Core)

1. Retrieve and Extract mod_rpaf packages:

# cd /usr/local/src
# wget
# tar xzvf mod_rpaf-0.6.tar.gz
# cd mod_rpaf-0.6

2. Build and install mod_rpaf

# apxs -i -c -n mod_rpaf-2.0.c

[ httpd-devel is the package required to run apxs ]

3. Add mod_rpaf to Apache configuration

# vim /etc/httpd/conf/httpd.conf
  • Find the “LoadModule” list (near the top)
  • Add the following lines at the bottom of the “LoadModule” list:
LoadModule rpaf_module modules/
# mod_rpaf Configuration
RPAFenable On
RPAFsethostname On
RPAFheader X-Forwarded-For

Important: Where “″ is, add your proxy server IP address(es). This will tell mod_rpaf which hosts to get X-Forwarded-For headers from.

4. Finish
Restart Apache for the changes to take effect

service httpd restart

Leave a Reply

Your email address will not be published. Required fields are marked *