Install mod_rpaf on CentOS 5, CentOS 6

Standard

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 http://www.stderr.net/apache/rpaf/download/mod_rpaf-0.6.tar.gz
# 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.so 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-2.0.so
# mod_rpaf Configuration
RPAFenable On
RPAFsethostname On
RPAFproxy_ips 127.0.0.1 10.0.0.1
RPAFheader X-Forwarded-For

Important: Where “127.0.0.1 10.0.0.1″ 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 *