- install cloudflare_module
https://support.cloudflare.com/hc/en-us/articles/203656534-How-do-I-restore-original-visitor-IP-with-Apache-2-4-
mirght need to change sudo yum install httpd-devel libtool git with sudo yum install httpd24-devel libtool git
- put the config file to /etc/httpd/conf.d/cloudflare.conf
CloudFlareRemoteIPHeader X-Forwarded-For
CloudFlareRemoteIPTrustedProxy 10.0.0.0/8
RemoteIPHeader CF-Connecting-IP
- update
/etc/httpd/conf/httpd.conf
LogFormat "%{X-Forwarded-For}i %{CF-Connecting-IP}i %v %h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
- add to /etc/httpd/conf.d/ssl.conf
LogFormat "%{X-Forwarded-For}i %{CF-Connecting-IP}i %v %h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\""
before
TransferLog logs/ssl_access_log
- restart apache