Control Web Panel
WebPanel => How to => Topic started by: dadashali 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- (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
(http://s6.uplod.ir/i/00751/zdzcp4f4xd1v.jpg)
-
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.
-
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
-
which script u r using ? wordpress ..... ????
-
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
-
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
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
-
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
-
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.