Easy Apache Installing Mod_Cloudflare for Apache 2.4.x Cloudflare Services

pmc

Member
May 13, 2012
16
1
51
cPanel Access Level
Root Administrator
This Install guide should take no more then 10 seconds if it does then you did something wrong.

Code:
cd /usr/local/src/


wget https://raw.github.com/cloudflare/mod_cloudflare/master/mod_cloudflare_apache2_4.c


apxs -a -i -c mod_cloudflare_apache2_4.c


/usr/local/cpanel/bin/apache_conf_distiller --update
httpd restart

httpd -M

Verify that modcloudflare is Loaded.

That's it.

Please improve or correct it where needed.
 

Spetsnaz

Well-Known Member
Jun 25, 2011
78
0
56
cPanel Access Level
Website Owner
I get the following error
[email protected] [/usr/local/src]# apxs -a -i -c mod_cloudflare_apache2_4.c
/usr/local/apache/build/libtool --silent --mode=compile gcc -prefer-pic --param ggc-min-expand=1 --param ggc-min-heapsize=4096 -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -pthread -I/opt/pcre/include -I/usr/local/apache/include -I/usr/local/apache/include -I/usr/local/apache/include -c -o mod_cloudflare_apache2_4.lo mod_cloudflare_apache2_4.c && touch mod_cloudflare_apache2_4.slo
mod_cloudflare_apache2_4.c: In function âcloudflare_modify_connectionâ:
mod_cloudflare_apache2_4.c:268: error: âconn_recâ has no member named âclient_addrâ
mod_cloudflare_apache2_4.c:269: error: âconn_recâ has no member named âclient_ipâ
mod_cloudflare_apache2_4.c:286: error: âconn_recâ has no member named âclient_addrâ
mod_cloudflare_apache2_4.c:298: error: âconn_recâ has no member named âclient_addrâ
mod_cloudflare_apache2_4.c:407: error: âconn_recâ has no member named âclient_addrâ
mod_cloudflare_apache2_4.c:408: error: âconn_recâ has no member named âclient_ipâ
mod_cloudflare_apache2_4.c:415: error: âconn_recâ has no member named âclient_ipâ
mod_cloudflare_apache2_4.c:417: error: âconn_recâ has no member named âclient_ipâ
mod_cloudflare_apache2_4.c:420: error: âconn_recâ has no member named âclient_addrâ
mod_cloudflare_apache2_4.c:421: error: âconn_recâ has no member named âclient_ipâ
mod_cloudflare_apache2_4.c:421: error: âconn_recâ has no member named âclient_addrâ
mod_cloudflare_apache2_4.c:425: error: âconn_recâ has no member named âclient_addrâ
mod_cloudflare_apache2_4.c:435: error: âconn_recâ has no member named âclient_ipâ
mod_cloudflare_apache2_4.c:435: error: âconn_recâ has no member named âclient_ipâ
mod_cloudflare_apache2_4.c:436: error: âconn_recâ has no member named âclient_ipâ
mod_cloudflare_apache2_4.c:438: error: ârequest_recâ has no member named âuseragent_ipâ
mod_cloudflare_apache2_4.c:438: error: âconn_recâ has no member named âclient_ipâ
mod_cloudflare_apache2_4.c:439: error: ârequest_recâ has no member named âuseragent_addrâ
mod_cloudflare_apache2_4.c:439: error: âconn_recâ has no member named âclient_addrâ
mod_cloudflare_apache2_4.c:443: error: âconn_recâ has no member named âclient_addrâ
apxs:Error: Command failed with rc=65536
.
[email protected] [/usr/local/src]#
 

cPanelJamyn

Social Engineer
Staff member
Jan 29, 2009
105
2
143
I get the following error:

mod_cloudflare_apache2_4.c: In function âcloudflare_modify_connectionâ:
mod_cloudflare_apache2_4.c:268: error: âconn_recâ has no member named âclient_addrâ
mod_cloudflare_apache2_4.c:269: error: âconn_recâ has no member named âclient_ipâ
<snip>
At first glance, it looks like you're trying to apply an Apache 2.4 patch to Apache 2.2, which will not work. I just tested this patch against the Apache 2.4 shipped in EA 3.18.9 and it applied without error.
 

kernow

Well-Known Member
Jul 23, 2004
995
42
178
cPanel Access Level
Root Administrator
URL returns a 404 ??


This Install guide should take no more then 10 seconds if it does then you did something wrong.

Code:
cd /usr/local/src/


wget https://raw.github.com/cloudflare/mod_cloudflare/master/mod_cloudflare_apache2_4.c


apxs -a -i -c mod_cloudflare_apache2_4.c


/usr/local/cpanel/bin/apache_conf_distiller --update
httpd restart

httpd -M

Verify that modcloudflare is Loaded.

That's it.

Please improve or correct it where needed.
 
Last edited:

kernow

Well-Known Member
Jul 23, 2004
995
42
178
cPanel Access Level
Root Administrator
I found it in another location but still get the rc=65536 error. installed Apache is 2.4
Code:
# apxs -a -i -c mod_cloudflare_apache2_4.c
/usr/lib64/apr-1/build/libtool --silent --mode=compile gcc -prefer-pic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -fno-strict-aliasing  -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -pthread -I/usr/include/httpd  -I/usr/include/apr-1   -I/usr/include/apr-1   -c -o mod_cloudflare_apache2_4.lo mod_cloudflare_apache2_4.c && touch mod_cloudflare_apache2_4.slo
mod_cloudflare_apache2_4.c: In function 'cloudflare_modify_connection':
mod_cloudflare_apache2_4.c:268: error: 'conn_rec' has no member named 'client_addr'
mod_cloudflare_apache2_4.c:269: error: 'conn_rec' has no member named 'client_ip'
mod_cloudflare_apache2_4.c:283: error: 'conn_rec' has no member named 'client_addr'
mod_cloudflare_apache2_4.c:295: error: 'conn_rec' has no member named 'client_addr'
mod_cloudflare_apache2_4.c:404: error: 'conn_rec' has no member named 'client_addr'
mod_cloudflare_apache2_4.c:405: error: 'conn_rec' has no member named 'client_ip'
mod_cloudflare_apache2_4.c:412: error: 'conn_rec' has no member named 'client_ip'
mod_cloudflare_apache2_4.c:414: error: 'conn_rec' has no member named 'client_ip'
mod_cloudflare_apache2_4.c:417: error: 'conn_rec' has no member named 'client_addr'
mod_cloudflare_apache2_4.c:418: error: 'conn_rec' has no member named 'client_ip'
mod_cloudflare_apache2_4.c:418: error: 'conn_rec' has no member named 'client_addr'
mod_cloudflare_apache2_4.c:422: error: 'conn_rec' has no member named 'client_addr'
mod_cloudflare_apache2_4.c:432: error: 'conn_rec' has no member named 'client_ip'
mod_cloudflare_apache2_4.c:432: error: 'conn_rec' has no member named 'client_ip'
mod_cloudflare_apache2_4.c:433: error: 'conn_rec' has no member named 'client_ip'
mod_cloudflare_apache2_4.c:435: error: 'request_rec' has no member named 'useragent_ip'
mod_cloudflare_apache2_4.c:435: error: 'conn_rec' has no member named 'client_ip'
mod_cloudflare_apache2_4.c:436: error: 'request_rec' has no member named 'useragent_addr'
mod_cloudflare_apache2_4.c:436: error: 'conn_rec' has no member named 'client_addr'
apxs:Error: Command failed with rc=65536
 

ethical

Well-Known Member
Apr 7, 2009
96
8
58
I found it in another location but still get the rc=65536 error. installed Apache is 2.4
Code:
# apxs -a -i -c mod_cloudflare_apache2_4.c
/usr/lib64/apr-1/build/libtool --silent --mode=compile gcc -prefer-pic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -fno-strict-aliasing  -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -pthread -I/usr/include/httpd  -I/usr/include/apr-1   -I/usr/include/apr-1   -c -o mod_cloudflare_apache2_4.lo mod_cloudflare_apache2_4.c && touch mod_cloudflare_apache2_4.slo
mod_cloudflare_apache2_4.c: In function 'cloudflare_modify_connection':
mod_cloudflare_apache2_4.c:268: error: 'conn_rec' has no member named 'client_addr'
mod_cloudflare_apache2_4.c:269: error: 'conn_rec' has no member named 'client_ip'
mod_cloudflare_apache2_4.c:283: error: 'conn_rec' has no member named 'client_addr'
mod_cloudflare_apache2_4.c:295: error: 'conn_rec' has no member named 'client_addr'
mod_cloudflare_apache2_4.c:404: error: 'conn_rec' has no member named 'client_addr'
mod_cloudflare_apache2_4.c:405: error: 'conn_rec' has no member named 'client_ip'
mod_cloudflare_apache2_4.c:412: error: 'conn_rec' has no member named 'client_ip'
mod_cloudflare_apache2_4.c:414: error: 'conn_rec' has no member named 'client_ip'
mod_cloudflare_apache2_4.c:417: error: 'conn_rec' has no member named 'client_addr'
mod_cloudflare_apache2_4.c:418: error: 'conn_rec' has no member named 'client_ip'
mod_cloudflare_apache2_4.c:418: error: 'conn_rec' has no member named 'client_addr'
mod_cloudflare_apache2_4.c:422: error: 'conn_rec' has no member named 'client_addr'
mod_cloudflare_apache2_4.c:432: error: 'conn_rec' has no member named 'client_ip'
mod_cloudflare_apache2_4.c:432: error: 'conn_rec' has no member named 'client_ip'
mod_cloudflare_apache2_4.c:433: error: 'conn_rec' has no member named 'client_ip'
mod_cloudflare_apache2_4.c:435: error: 'request_rec' has no member named 'useragent_ip'
mod_cloudflare_apache2_4.c:435: error: 'conn_rec' has no member named 'client_ip'
mod_cloudflare_apache2_4.c:436: error: 'request_rec' has no member named 'useragent_addr'
mod_cloudflare_apache2_4.c:436: error: 'conn_rec' has no member named 'client_addr'
apxs:Error: Command failed with rc=65536

i also found in another location but also get an error with this? anyone have a solution??

EDIT: ok well i grabbed a google cache version of the file from this old location https://raw.github.com/cloudflare/CloudFlare-Tools/master/mod_cloudflare_apache2_4.c (which is gone now??) and looks like it worked with that. let me know and I can send you the file if you want to try but check google cache

John
 
Last edited: