Mod_cloudflare with Easyapache 4 and Apache 2.4 on CentOS 6.9

Hi,

I have installed

https://support.cloudflare.com/hc/en-us/articles/206175737-How-do-I-restore-original-visitor-IP-with-EasyApache-cPanel-

After installation, Apache is unable to start, and fails with:
Starting httpd: httpd: Syntax error on line 236 of /etc/apache2/conf/httpd.conf: Syntax error on line 1 of /etc/apache2/conf.d/Cloudflare.conf: Cannot load /usr/lib64/apache2/modules/mod_Cloudflare.so into server: /usr/lib64/apache2/modules/mod_Cloudflare.so: undefined symbol: ap_log_rerror

I tried running the options indicated here as well: https://www.cloudflare.com/technical-resources/#mod_Cloudflare
but none seem to work.

I also tried to build manually with:

cd /tmp
wget https://www.cloudflare.com/static/misc/mod_Cloudflare/mod_Cloudflare.c
apxs -a -i -c mod_Cloudflare.c

but that gives:
cannot open /usr/local/apache/build/config_vars.mk: No such file or directory at /usr/bin/apxs line 217.

Anyone that can help?

Thanks!!

I found a solution :). You have to install ea-apache24-devel

So:
yum install ea-apache24-devel
cd /tmp
wget https://www.cloudflare.com/static/misc/mod_Cloudflare/mod_Cloudflare.c
apxs -a -i -c mod_Cloudflare.c

3 Likes

User555 solution worked like a charm. Thank you so much.

1 Like