Download tools and plugins for control panels and content management systems.
Cloudflare will no longer update and support mod_cloudflare, starting with versions Debian 9 and Ubuntu 18.04 LTS of the Linux operating system. Customers who are interested in building the mod_cloudflare package can download the codebase from GitHub.
Because Cloudflare acts as a proxy, you will notice changes to the way that your website visitors' IP addresses are displayed both in your server logs and web applications - notably that all access appears to be coming from Cloudflare IP addresses. You can read more about the reasons for this in our knowledge base article.
You can change this behavior and log & display the actual visitor IP addresses by using mod_cloudflare.
mod_cloudflare supports Apache httpd 2.2.x and 2.4.x. Installation requires root access to the command line of your server via SSH.
Note: if you use cPanel, follow the proper installation method below. However, if you are a hosting provider, you should install the Cloudflare cPanel plugin instead. Installing the Cloudflare cPanel plugin will automatically install mod_cloudflare. Note that using the Cloudflare cPanel plugin requires that you are a Certified Partner with a Host API Key. You can apply to be a Certified Partner here.
Please choose your desired installation method below. Cloudflare recommends using a manual installation unless you know that Apache httpd and its dependencies have all been installed to your server using your operating system's package management system (such as RPM or DEB) - i.e. not manually compiled and installed.
Option 1: Installation from Packages
Download the appropriate package to your web server and install it using your operating system's 'rpm' or 'dkpg' commands.
For RedHat / CentOS / CloudLinux:
# yum install glibc.i686
# rpm -i mod_cloudflare-elX.latest.rpm
For Debian / Ubuntu:
# dpkg -i mod_cloudflare-XXXXX.latest.deb
Option 2: Installation on cPanel Servers
cPanel uses a system known as EasyApache to rebuild Apache httpd during updates or certain configuration changes. The below instructions will integrate mod_cloudflare support into EasyApache so that it can be easily included from the cPanel web interface and remain activated in Apache httpd after rebuilds.
Note: credit for this perl script goes to Tyler Larson at tltech.com.
# wget https://raw.githubusercontent.com/cloudflare/mod_cloudflare/master/EasyApache/installer.sh
# bash installer.sh
Alternatively, you can run this instead:
# bash <(curl -s https://raw.githubusercontent.com/cloudflare/mod_cloudflare/master/EasyApache/installer.sh)
Next, you can use EasyApache, choose to customize your profile, then, on the 'Short Options List' screen, checkbox the 'Mod Cloudflare' feature, and click 'Save and Build'.
Option 3: Manual Installation: RedHat / CentOS / CloudLinux
mod_cloudflare has a few software dependencies that need to be installed first:
# yum install libtool httpd-devel
Next, you should download the mod_cloudflare source to your server:
# wget https://raw.githubusercontent.com/cloudflare/mod_cloudflare/master/mod_cloudflare.c
Finally, install the module. Depending on your system, the command to run might be apxs or apxs2. So, run one of the below two commands. If you get a 'Command not found' when running one, try the other:
# apxs -a -i -c mod_cloudflare.c
# apxs2 -a -i -c mod_cloudflare.c
Option 4: Manual Installation: Debian / Ubuntu
mod_cloudflare has a few software dependencies that need to be installed first:
# apt-get install libtool apache2-dev
Note: If you find that you are unable to install apache2-dev then you should install:
# apt-get install libtool apache2-threaded-dev
Next, you should download the mod_cloudflare source to your server:
# wget https://www.cloudflare.com/static/misc/mod_cloudflare/mod_cloudflare.c
Finally, install the module. Depending on your system, the command to run might be apxs or apxs2. So, run one of the below two commands. If you get a 'Command not found' when running one, try the other:
# apxs -a -i -c mod_cloudflare.c
# apxs2 -a -i -c mod_cloudflare.c
Railgun ensures that the connection between your origin server and each Cloudflare data center is as fast as possible. It does this by using an array of techniques to accelerate the HTTP connections between Cloudflare and your servers. Railgun is available for Business and Enterprise users. Learn more about Railgun.
The use of Railgun on your own server requires a Business or Enterprise subscription and a 64-bit architecture.
Installation instructionsA port of ddclient, this includes support for using the Cloudflare dynamic DNS updating system.
Perl 5.004 or later (you need the IO::Socket::SSL perl library for ssl-support)
cp ddclient /usr/sbin/
mkdir /etc/ddclient
mkdir /var/cache/ddclient
cp sample-etc_ddclient.conf /etc/ddclient/ddclient.conf
vi /etc/ddclient/ddclient.conf
—and change hostnames, logins, and passwords appropriately
For Cloudflare, this should be:
##
## Cloudflare (cloudflare.com)
##
ssl=yes
protocol=cloudflare, \
server=www.cloudflare.com, \
[email protected] \
password=my-cloudflare-api-key \
my-awesome-site.com,
To run in debug mode:
ddclient -daemon=0 -debug -verbose -noquiet
See the docs here for full configuration and installation instructions.
DownloadCreate a directory for the HTTP Module. Example:
C:\> md c:\HttpModules
Copy the files from the Release build of your target platform (x86 for 32-bit or x64 for 64-bit). Example:
C:\> xcopy <zip_dir>\x64\Release\* c:\HttpModules
Copy the Install-XFF-ps1 PowerShell script to the target directory. Example:
C:\> xcopy <zip_dir>\Install-XFF.ps1 c:\HttpModules
Change directory to the install path
C:\> cd c:\HttpModules
Register the Module with the install script (or via IIS admin).
C:\HttpModules\> .\Install-XFF.ps1 -cmd install -module_path c:\HttpModules\F5XFFHttpModule.dll
The module should now be installed in your top level IIS server Module settings as well as each existing application. You can selectively add/remove them from the IIS admin at this point.
The F5 XFF Http Module supports a configuration file named F5XFFHttpModule.ini
. It looks in the same directory as the configured .DLL for a file of the same name as it self with the .INI extension. An example file is included but renamed to F5XFFHttpModule.ini.bak
. Once you get rid of the ".bak" extension and restart the application the settings will take effect. In this configuration file, you should override the default header name of X-Forwarded-For
to CF-Connecting-IP
.
Cloudflare Extension for WHMCS 5.3.
Download Instructions in PDF Format
DownloadCloudflare Extension for Parallels Plesk 12.
Download Instructions in PDF Format
DownloadCloudflare plugin for CPanel. Please note: The cPanel plugin is for Certified Cloudflare Hosting Partners.
Download Instructions in PDF Format
Using an SSH client such as Terminal or Putty:
Step 1. Access cPanel for the server using root user by:
ssh [email protected] IP ADDRESS or SERVER NAME
Step 2.
bash <(curl -s https://raw.githubusercontent.com/cloudflare/CloudFlare-CPanel/master/cloudflare.install.sh) -k HOST_API_KEY -n 'YOUR_COMPANY_NAME'
Interworx has developed a plugin for their hosting provider control panel system. This plugin allows Cloudflare partners to enter their Host API Key and easily allow their customers to sign up for and manage Cloudflare services..
Installation InstructionsEnter the ISPmanager control panel - go to the Server Settings module - the Plug-Ins section. Then, click the Install icon in the upper corner of the toolbar.
In the Plug-ins collection section you can choose a plug-in that you want to install from the available collection of plug-ins. You can also view information about a plug-in, such as its author, programming language that was used to write the plug-in, its functions and other information.
If you want to install the Cloudflare plug-in, select it from the list and click the "Install" icon. A new from will be displayed. Carefully read the information in the form before installation.
To learn information about a plug-in, select one and click the "Info" icon. The following form will be displayed:
This document explains in detail the semantics of the function calls you can make using the Hosting Provider API service. This service is limited to access by web hosting providers who have agreed to the required license terms.
Cloudflare Hosting Provider APIThird party Host API client in PERL
DownloadThird party Host API client in PHP
Download