Hello,
I’m trying to figure out why visitor IPs show as 127.0.0.1 when I enable Varnish on my Piwik stats web server running nginx and Varnish. Data is collected via the piWiki Analytics plugin for Wordpress. My Wordpress blog sits upon two VPSes which are load balanced and each run nginx and Varnish caching server on top of Debian Squeeze (all standard packages from Squeeze). My Piwik server also runs Debian Squeeze, Varnish and nginx.
Once everything was set-up, the correct IPs seem to show up in the visitor information within Piwik, but then subsequent requests started showing up as 127.0.0.1. I then disabled Varnish on the Piwik server and tested a few visits and the correct IP now shows up.
Is Varnish across all three servers getting Piwik confused? On another Piwik install (a single VPS with Debian Squeeze, Varnish, nginx and where Piwik is installed on the same VPS rather than separately in my own case) Piwik seems to be processing IPs correctly.
Any ideas? I’m happy to live without Varnish on my stats server, but curious to know what’s happening.
Thanks,
Martyn