When using Cloudflare, all the hits to your web server will come from a Cloudflare IP address. So in order to retrieve the actual IP address from the visitor you must install mod_cloudflare.
1. Connect to your server through SSH and log in as root.
2. Change directory to /usr/local/src :
cd /usr/local/src
3. Get the source code for mod_cloudflare:
wget –no-check-certificate https://raw.githubusercontent.com/cloudflare/mod_cloudflare/master/mod_cloudflare.c
4. Use the Apache Extension Tool to build and install mod_cloudflare:
yum install httpd-devel
apxs -a -i -c mod_cloudflare.c
5. Restart the Apache HTTP daemon:
service httpd restart
6. Finally, update the Apache configuration data files:
/usr/local/cpanel/bin/apache_conf_distiller –update