08 Jul

CloudFlare: Restore original visitor IP to Apache Web Servers

Since CloudFlare acts as a reverse proxy for websites, CloudFlare’s IPs are going to show in your server logs. This can be easily identified from awstats or webalizer.
There is an easy fix to restore original visitor IP for any web server.
1) Copy the source file mod_cloudflare.c to your web server.
wget https://raw.github.com/cloudflare/CloudFlare-Tools/master/mod_cloudflare.c
2) Make sure that the command apxs or apxs2 is installed somewhere.
If you are running Ubuntu or Debian, this can be installed with:

apt-get install apache2-prefork-dev

If you are running Fedora or CentOS, this can be installed with:

yum install httpd-devel

3) Execute this command as root:

apxs2 -iac mod_cloudflare.c

4) Restart apache.
5) Lastly, make sure that mod_cloudflare is working by tailing your access.log file. ou should see that the remote_ip field here is no longer that of the CloudFlare CDN IP ranges. You can execute this command to verify mod_cloudflare is loaded into Apache:

apachectl -t -D DUMP_MODULES | grep cloud

Related article

Incoming search terms:

  • awstas ip cloudflare
  • https://yandex ru/clck/jsredir?from=yandex ru;search;web;;&text=&etext=1834 9SPBP_InW5nnXbCzDuN9S5IS_mSH4ahzSCLTl-0_G2YJgm5ujxBUTynAMbGQ8JyI 4a525530d865af1029d216456bf2e43c332ceb03&uuid=&state=_BLhILn4SxNIvvL0W45KSic66uCIg23qh8iRG98qeIXme
08 Jul

Use CloudFlare to accelerate your website

How Does CloudFlare’s Technology Work

CloudFlare’s technology is built like a CDN (content delivery network). It is a cloud-based, distributed network, which means it has multiple data centers spread across the web. When you add a domain to your CloudFlare account, CloudFlare acts as a proxy. This means that your visitor’s requests to your website are routed through the CloudFlare network.

To start using CloudFlare is fairly simple, go to https://www.cloudflare.com and add you site there. It takes around 1 minutes for CloudFlare to check your DNS record. Once verification finished, you must change your nameserver using CloudFlare’s predefined DNS server.