How do I restore original visitor IP with Apache 2.4?

 

  1. Make sure the following is installed:
    Red Hat/Fedora:
    sudo yum install httpd-devel libtool git
    Debian/Ubuntu:
    sudo apt-get install apache2-dev libtool git
  2. Clone the following for the most recent build of mod_cloudflare:
    Red Hat/Fedora/Debain/Ubuntu:
    git clone https://github.com/cloudflare/mod_cloudflare.git && cd mod_cloudflare
  3. Use the Apache extension tool to convert the .c file into a module:
    Red Hat/Fedora/Debain/Ubuntu:
    apxs -a -i -c mod_cloudflare.c
  4. Restart & verify the module is active:
    Red Hat/Fedora:
    service httpd restart && httpd -M|grep cloudflare
    Debian/Ubuntu:
    sudo apachectl restart; apache2ctl -M|grep cloudflare
 
Still not finding what you need?

The CloudFlare team is here to help. 95% of questions can be answered using the search tool, but if you can’t find what you need, submit a support request.