Author Topic: mod_cloudflare doesn't work with successful installtion!  (Read 17446 times)

0 Members and 1 Guest are viewing this topic.

Offline
*
mod_cloudflare doesn't work with successful installtion!
« on: March 02, 2016, 12:46:09 AM »
Hi,
I installed "mod_cloudflare" successful on CWP that use apache web server via this link: https://support.cloudflare.com/hc/en-us/articles/203656534-How-can-I-set-up-Apache-mod-CloudFlare-
After this all i see visitors ip still are not their real ip ... and im sure the module is active on my VPS. You can see it on attached screen shot.
Any idea how to fix this matter?

Regards


« Last Edit: March 02, 2016, 12:48:45 AM by dadashali »

Offline
*
Re: mod_cloudflare doesn't work with successful installtion!
« Reply #1 on: March 02, 2016, 03:48:16 PM »
Are you running varnish? That's usually the culprit when it comes to Apache is logging the server's own IP as the source of all traffic.

Offline
*
Re: mod_cloudflare doesn't work with successful installtion!
« Reply #2 on: March 02, 2016, 07:17:11 PM »
No its Apache only with out any thing else but as i said i used "mod_cloudflare" as a module that work like a cache and change the user IP to it's own.

Regards

Offline
*****
Re: mod_cloudflare doesn't work with successful installtion!
« Reply #3 on: March 06, 2016, 08:05:07 AM »
which script u r using ? wordpress ..... ????

Offline
*
Re: mod_cloudflare doesn't work with successful installtion!
« Reply #4 on: February 11, 2017, 07:15:12 AM »
Does not work with cwp7
I tried all solutions from the forum and from google results
With apache only selected returns the cloudflare IP
with apache + nginx returns the server IP
some with varnish or all 3
maybe someone know the solution
In case anyone wants $10 bonus for FREE on cheap cloud VPS from Vultr:
http://www.vultr.com/?ref=6855695
-------------------------------------------------------------------------------------------------
And $10 bonus for FREE on cheap cloud VPS from Digitalocean:
https://www.digitalocean.com/?refcode=c41029801394

Offline
***
Re: mod_cloudflare doesn't work with successful installtion!
« Reply #5 on: February 21, 2017, 10:16:27 AM »
Does not work with cwp7
I tried all solutions from the forum and from google results
With apache only selected returns the cloudflare IP
with apache + nginx returns the server IP
some with varnish or all 3
maybe someone know the solution

May I ask what's the reason you need to see visitor's ip
I suggest not to use cloudflare. It's annoying, dont trust their words (If you are using Free plan)
Have you try Mod GeoIP

Quote
yum -y install geoip-devel
cd /tmp
wget http://pecl.php.net/get/geoip-1.0.8.tgz
tar -zxvf  geoip-1.0.8.tgz
cd geoip-1.0.8
/usr/local/bin/phpize
./configure --with-php-config=/usr/local/bin/php-config
make
make install
3. After "make install" command execution done you will get a line stating the shared extension directory path. For Example : some text /usr/lib64/extensions/no-debug-non-zts-20131226
4. Copy that directory path only. Then go to your php.ini file editor.
5. Go to the bottom of the file and paste : extension_dir = the path you copied from the make install completion.
6. After the extension_dir line put : extension=geoip.so
7. Restart Apache and to verify the module, use this command : php -m




Offline
*****
Re: mod_cloudflare doesn't work with successful installtion!
« Reply #6 on: February 23, 2017, 01:52:09 PM »
use this commands for el7

yum install libtool git -y

git clone https://github.com/cloudflare/mod_cloudflare.git && cd mod_cloudflare

/usr/local/apache/bin/apxs -a -i -c mod_cloudflare.c

systemctl restart httpd && /usr/local/apache/bin/httpd -M|grep cloudflare


Offline
*
Re: mod_cloudflare doesn't work with successful installtion!
« Reply #7 on: February 10, 2019, 09:59:04 PM »
I found the problem. Add to apache config file (/usr/local/apache/conf/httpd.conf)

this line:

CloudflareRemoteIPTrustedProxy 123.123.123.123

Replace "123.123.123.123" with your server's IP.