Install CloudFlare Apache Module

Download the Pearl installer script that will allow you to compile the Apache EasyScript to include the mod_cloudflare module. Login your cpanel server ssh.

perl <(curl install

Go to WHM->EasyApache update script.


You get to the short options list or exhaustive list and select the ModCloudFlare option.


Save and build the new profile. Thats all!!.. When you run the installer script, it downloads the latest version of the mod_cloudflare.c source code from the official distribution point and packages it up with a simple description file that tells EasyApache what to do with it.

Solution 2

You can simply install it directly through the script. To run the install script on your server, download this script here: Then run it using the following command:

perl install

Once you’ve installed the EasyApache component, re-run the EasyApache build script, either through the WHM web interface or by running /scripts/easyapache to complete the installation. Select “Mod CloudFlare” from the build menu to enable the Apache module, or deselect it to disable the module, and then run your build.


Based on mod_remoteip.c, this Apache extension will replace the remote_ip variable in user’s logs with the correct remote IP sent from CloudFlare. The module only performs the IP substitution for requests originating from CloudFlare IPs by default. To install, follow the instructions on: Logging Real Visitor IP Addresses: mod_cloudflare for Apache httpd

Preserve Original Visitor IP in Log Files

All requests to a CloudFlare protected website will come from the CloudFlare IP address ranges:

DO NOT THROTTLE OR RATE-LIMIT these IP addresses, or your customers’ website visitors will see a “Website Offline” page.

CloudFlare passes the original visitor IP address in the header of every request. To retrieve the original visitor IP from the header, install the appropriate software on your server, you can find download links in the CloudFlare Partner Portal at (Note: If you use the cPanel plugin and are running Apache, the visitor IP software will automatically be installed).

Get Free cPanel Knowledge Base

Thank you for subscribing.

Something went wrong.

0.00 avg. rating (0% score) - 0 votes