mod_cloudflare for Apache for Logging Real Visitor IP Addresses
Cloudflare acts as a proxy and can help you speed your website, no matter static or dynamic. After switching to Cloudflare, you will notice that all your website visitors’ IP addresses appear to be coming from Cloudflare IP addresses. Here mod_cloudflare for Apache httpd comes in handy. Read more about the reasons for this at their website.
If you want Apache to log the real IP addresses of the websites’ visitors, you need to install the Apache httpd module mod_cloudflare. If you are not using cPanel or DirectAdmin on your server, the knowledge resource at Cloudflare website will suffice Technical Support mod_cloudflare
There are detailed heads up for the main Linux distribution used for servers RedHat, CentOS, CloudLinux, Debian, and Ubuntu together with the corresponding downloads.
You can find a help with installing mod_cloudflare on cPanel servers on the same page. cPanel uses EasyApache to rebuild Apache httpd during updates.
mod_cloudflare for Apache on DirectAdmin Servers
On DirectAdmin Servers, httpd is modified and updated by CustomBuild. Hence we use the httpd-includes.conf file, as it’s not modified by CustomBuild. Instead of using package managers, we install mod_cloudflare.c manually using apxs. apxs is a tool for building and installing extension modules for the Apache. More info on the DirectAdmin Website