Logging Real Visitor IP Addresses: mod_cloudflare for Apache httpd

Logging Real Visitor IP Addresses: mod_cloudflare for Apache httpd

Requirements :

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.

Installing best way without problems :

 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://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

 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


Share Button