This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
fuss:piwik [2017/07/14 19:34] – created office | fuss:piwik [2022/04/19 08:28] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== Forwarding Correct IP from Varnish ====== | ||
+ | To forward the correct IP from Varnish to piwik, make sure that '' | ||
+ | < | ||
+ | if (req.http.host == " | ||
+ | # 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 '' | ||
+ | |||
+ | Finally, edit the '' | ||
+ | < | ||
+ | [General] | ||
+ | proxy_client_headers[] = " | ||
+ | proxy_host_headers[] = " | ||
+ | </ | ||
+ |