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 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
/etc/init.d/httpd restart
5. Troubleshooting
The following dependencies may need to be installed before installing mod_rpaf:
httpd-devel, gcc
They can be installed using the following commands:
yum install httpd-devel gcc
没有评论