mod_remoteip:Apache-2.4自带模块;Apache-2.2支持
wget https://github.com/ttkzw/mod_remoteip-httpd22/raw/master/mod_remoteip.c
/usr/local/apache/bin/apxs -i -c -n mod_remoteip.so mod_remoteip.c
vi /usr/local/apache/conf/httpd.conf
RemoteIPHeader X-Forwarded-For
RemoteIPInternalProxy 127.0.0.1
service httpd restart