Forwarding Correct IP from Varnish

To forward the correct IP from Varnish to piwik, make sure that req.http.X-Forwarded-For is set to client.ip in vcl_recv:

if ( == "") {
        # Set the X-Forwarded-For to the client IP address.
	set req.http.X-Forwarded-For = client.ip;
        # Do not cache.

Note that the addition of set req.http.X-Forwarded-For = client.ip; is not needed if you are using the Wizardry and Steamworks Varnish template.

Finally, edit the piwik/config/config.ini.php file to add:

proxy_client_headers[] = "HTTP_X_FORWARDED_FOR"
proxy_host_headers[] = "HTTP_X_FORWARDED_FOR"

fuss/piwik.txt ยท Last modified: 2017/07/14 20:38 by office

Access website using Tor Access website using i2p

For the copyright, license, warranty and privacy terms for the usage of this website please see the license, privacy and plagiarism pages.