Be careful that you’ll download proper package from cloudflare repository. In my case, I’m using Apache 2.4 on Directadmin installation. At first, I downloaded wrong version of mod_cloudflare.c and was constantly getting errors while trying to build module.
Download mod_cloudflare
wget https://www.cloudflare.com/static/misc/mod_cloudflare/mod_cloudflare.c
Install mod_cloudflare using apxs
apxs -a -i -c mod_cloudflare.c
Check if module was installed into Apache
[root@server ~]# httpd -M | grep cloud cloudflare_module (shared)
Hi
The link to mod_cloudflare.c no longer works. Please can you update?
wget link no longer works. Cloudflare not providing that mod anymore. This tutorial is out of date.