Error installing mod_cloudflare

YanoLoL

Member
Oct 15, 2016
10
0
1
Brazil
cPanel Access Level
Root Administrator
I need view original visitor IP when the user uses Cloudflare, i try install mod_cloudflare, but i had problems.

In terminal i'm use this:
Code:
bash <(curl -s https://raw.githubusercontent.com/cloudflare/mod_cloudflare/master/EasyApache/installer.sh)
But when retart my HTTPD retorn this error

Code:
[[email protected] ~]# /etc/init.d/httpd restart
Stopping httpd:                                            [FAILED]
Starting httpd: httpd: Syntax error on line 27 of /etc/apache2/conf/httpd.conf: Syntax error on line 1 of /etc/apache2/conf.modules.d/cloudflare.conf: Cannot load modules/mod_cloudflare.so into server: /etc/apache2/modules/mod_cloudflare.so: undefined symbol: ap_log_rerror
I remove /etc/apache2/conf.modules.d/cloudflare.conf and i my HTTPD restart normal
 

vacancy

Well-Known Member
Sep 20, 2012
486
172
93
Turkey
cPanel Access Level
Root Administrator
Please try.

Code:
yum -y install ea-apache24-mod_remoteip
Apache configuration > include editor > Pre Main Include

Add and save the codes below.


Code:
<IfModule remoteip_module>
  RemoteIPHeader X-Forwarded-For
</IfModule>
<IfModule log_config_module>
  LogFormat "%{Referer}i -> %U" referer
  LogFormat "%{User-agent}i" agent
  LogFormat "%a %l %u %t \"%r\" %>s %b" common
  LogFormat "%a %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
  CustomLog logs/access_log combined
</IfModule>

mod_remoteip and mod_cloudflare do the same thing.
 

YanoLoL

Member
Oct 15, 2016
10
0
1
Brazil
cPanel Access Level
Root Administrator
Please try.

Code:
yum -y install ea-apache24-mod_remoteip
Apache configuration > include editor > Pre Main Include

Add and save the codes below.


Code:
<IfModule remoteip_module>
  RemoteIPHeader X-Forwarded-For
</IfModule>
<IfModule log_config_module>
  LogFormat "%{Referer}i -> %U" referer
  LogFormat "%{User-agent}i" agent
  LogFormat "%a %l %u %t \"%r\" %>s %b" common
  LogFormat "%a %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
  CustomLog logs/access_log combined
</IfModule>

mod_remoteip and mod_cloudflare do the same thing.
I try this and didn't work.