How do I restore original visitor IP with Apache 2.4?

 We provide pre-built packages for most current distribution releases at

You can also build and install mod_cloudflare manually:

    1. Make sure the following is installed:
      Red Hat/Fedora:
      sudo yum install httpd-devel libtool git
      sudo apt-get install apache2-dev libtool git
    2. Clone the following for the most recent build of mod_cloudflare:
      Red Hat/Fedora/Debian/Ubuntu:
      git clone && 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
      sudo apachectl restart; apache2ctl -M|grep cloudflare
    5. If your web server is behind a load balancer, add the following line to your Apache configuration (replace with your load balancer's IP address):
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.

Powered by Zendesk