安装mod_rpaf让在后端apache获取客户端IP

在前端服务器中可以使用X-Forwarded-For将客户端真实IP传递到后端,但apache无法直接处理需借助模块实现, stderr.net发布的mod_rpaf for Apache就是实现这个的一个东东。Linux 安装shell代码wget -c http://stderr.net/apache/rpaf/download/mod_rpaf-0.6.tar.gz tar xvfz mod_rpaf-0.6.tar.gz cd mod_rpaf-0.6 /usr/sbin/apxs -i -c -n mod_rpaf-2.0.so mod_rpaf-2.0.c cat >>/etc/httpd/conf/httpd.conf