This version is outdated by a newer approved version.DiffThis version (2014/02/04 13:43) is a draft.
Approvals: 0/1

This is an old revision of the document!


Running Piwik with Cloudflare

After switching my site to Cloudflare CDN, I noticed that the IPs showing are no longer the clients IPs, but the ones from Cloudflare, which is similar to running a site behind a reverse proxy (in essence I assume Cloudflare is doing exactly that). This require a small config change in piwik to evaluate the client IP correctly. (the same solution can be applied as for a regular reverse proxy, but Cloudflare provides a specific header field for that).

Add the following lines to the end of the config/config.ini.php file:

[General]
proxy_client_headers[] = "CF_CONNECTING_IP"

If the [General] section already appears in your config, just add the 2nd line to the section.

This way the proper IPs should appear in the analytics.