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 (req.http.host == "piwik.domain.com") {
        # Set the X-Forwarded-For to the client IP address.
	set req.http.X-Forwarded-For = client.ip;
        # Do not cache.
	return(pass);
}

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:

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

fuss/piwik.txt ยท Last modified: 2022/04/19 08:28 by 127.0.0.1

Access website using Tor Access website using i2p Wizardry and Steamworks PGP Key


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