How to Install mod_cloudflare in cPanel

How to Install mod_cloudflare in cPanel

When using Cloudflare, all the hits to your web server will come from a Cloudflare IP address. So in order to retrieve the actual IP address from the visitor you must install mod_cloudflare.

1. Connect to your server through SSH and log in as root.

2. Change directory to /usr/local/src :

cd /usr/local/src

3. Get the source code for mod_cloudflare:

wget –no-check-certificate https://raw.githubusercontent.com/cloudflare/mod_cloudflare/master/mod_cloudflare.c
image 16 - How to Install mod_cloudflare in cPanel

4. Use the Apache Extension Tool to build and install mod_cloudflare:

yum install httpd-devel
apxs -a -i -c mod_cloudflare.c
image 17 1024x493 - How to Install mod_cloudflare in cPanel

5. Restart the Apache HTTP daemon:

service httpd restart
image 18 1024x384 - How to Install mod_cloudflare in cPanel

6. Finally, update the Apache configuration data files:

/usr/local/cpanel/bin/apache_conf_distiller –update
whoami
Stefan Pejcic
Join the discussion

I enjoy constructive responses and professional comments to my posts, and invite anyone to comment or link to my site.