Trying to install mod_cloudflare with CentOS 6

enkrypt

Verified User
Joined
Feb 3, 2011
Messages
38
I am having a problem installing mod_cloudflare with centOS 6.3 final. Here is the error I get when running apxs2 -a -i -c mod_cloudflare.c

Code:
[root@overload mods]# apxs2 -a -i -c mod_cloudflare.c
/var/www/build/libtool --silent --mode=compile gcc -std=gnu99 -prefer-pic   -DLINUX                                                                              =2 -D_REENTRANT -D_GNU_SOURCE -g -O2 -pthread -I/usr/include/apache  -I/usr/include                                                                              /apache   -I/usr/include/apache   -c -o mod_cloudflare.lo mod_cloudflare.c && touch                                                                               mod_cloudflare.slo
mod_cloudflare.c: In function 'cloudflare_modify_connection':
mod_cloudflare.c:268: error: 'conn_rec' has no member named 'remote_addr'
mod_cloudflare.c:269: error: 'conn_rec' has no member named 'remote_ip'
mod_cloudflare.c:291: error: 'conn_rec' has no member named 'remote_addr'
mod_cloudflare.c:303: error: 'conn_rec' has no member named 'remote_addr'
mod_cloudflare.c:412: error: 'conn_rec' has no member named 'remote_addr'
mod_cloudflare.c:413: error: 'conn_rec' has no member named 'remote_ip'
mod_cloudflare.c:420: error: 'conn_rec' has no member named 'remote_ip'
mod_cloudflare.c:422: error: 'conn_rec' has no member named 'remote_ip'
mod_cloudflare.c:425: error: 'conn_rec' has no member named 'remote_addr'
mod_cloudflare.c:426: error: 'conn_rec' has no member named 'remote_ip'
mod_cloudflare.c:426: error: 'conn_rec' has no member named 'remote_addr'
mod_cloudflare.c:430: error: 'conn_rec' has no member named 'remote_addr'
mod_cloudflare.c:440: error: 'conn_rec' has no member named 'remote_ip'
mod_cloudflare.c:440: error: 'conn_rec' has no member named 'remote_ip'
mod_cloudflare.c:441: error: 'conn_rec' has no member named 'remote_ip'
mod_cloudflare.c:444: error: 'conn_rec' has no member named 'remote_addr'
mod_cloudflare.c:459: error: expected declaration or statement at end of input
apxs:Error: Command failed with rc=65536
.
Any suggestions? I tried installing it with the RPM however it says I need Apache2 which here is my current httpd version:
Code:
[root@overload mods]# httpd -v
Server version: Apache/2.4.4 (Unix)
Server built:   Mar 28 2013 00:31:32
[root@overload mods]#
I am running Directadmin with custombuild any help would be greatly appreciated.

Thanks,
Christopher
 

redjersey

Verified User
Joined
Apr 22, 2013
Messages
93
Location
Toronto, Canada
even though this is a 3 month old topic I have decided to reply and hope that it might be useful for someone else.
instead of executing:
apxs2 -a -i -c mod_cloudflare.c

get the one for apache 2.4 ie:
Code:
wget https://raw.github.com/cloudflare/mod_cloudflare/master/mod_cloudflare_apache2_4.c --no-check-certificate
apxs2 -a -i -c mod_cloudflare_apache2_4.c
 
Top