Issue: cPanel server using Easy Apache 4 (EA4) is showing incorrect IP addresses in visitor statistics. The IP addresses are Cloudflare based, instead of the original client IP address.
Solution: Install Mod Cloudflae for EA4
JPerkster at GitHub maintains a package for this:
https://github.com/JPerkster/ea-apache24-mod_cloudflare
This github project installs the module and adds it into EasyApache so that future rebuilds keep the module active.
SSH into server and complete the following…
Get the package:
wget -O /etc/yum.repos.d/EA4-Mod-Cloudflare.repo http://download.opensuse.org/repositories/home:/Jperkster:/EA4_Mod_Cloudflare/CentOS-7/home:Jperkster:EA4_Mod_Cloudflare.repo
Install the package:
yum install ea-apache24-mod_cloudflare
No need to add and provision in EA4 (it’s already installed) – Just restart httpd.
Removal if required:
yum remove ea-apache24-mod_cloudflare