@mattab opened this Issue on February 2nd 2012 Member

reported in forum post

This is because at https://github.com/piwik/piwik/blob/master/misc/proxy-hide-piwik-url/piwik.php#L101

we simply read REMOTE_ADDR but should also read other parameters that we know could contain IP?

@robocoder commented on February 4th 2012 Contributor

As reported in that thread, the user got it working after adding adding the proxy_client_headers, proxy_host_headers.

Closing, as this is an environment/configuration issue, already covered by http://piwik.org/faq/how-to-install/#faq_98

@mattab commented on February 4th 2012 Member

Indeed his bug was fixed but technically the problem exists that if the server being tracked is behind a proxy, then IP tracking will not work.

@campino2k commented on July 11th 2013

For me, the problem was solved by using REMOTE_ADDR as Client Header.

I assume the bug hides in using HTTP_X_FORWARDED_FOR. There are (in my case) 3 IPs, seperated by Comma and it seems that Piwik takes the LAST IP instead of the first.

@anonymous-matomo-user commented on September 12th 2013

This issue still happening to me. I have followed the instructions in FAQ and tried what campino2k said. Doesnt work for me. Check my post --> http://forum.piwik.org/read.php?2,106184

@ghost commented on May 26th 2014

As of Piwik 2.2.2 stable, proxy_client_headers[] = HTTP_X_FORWARDED_FOR seems to have no effect when the CDN server acts as a reverse proxy.

@mattab commented on May 27th 2014 Member

In 300d3c27bfbb89b2e3aef0be04de3004afc2d4ff: Fixes #2900 Now reading 'HTTP_X_FORWARDED_FOR', 'HTTP_CLIENT_IP', 'HTTP_CF_CONNECTING_IP' and falling back to REMOTE_ADDR
Getting visitor IP via proxy script should now work!

This was also reported in: http://forum.piwik.org/read.php?2,115900

This Issue was closed on May 27th 2014
Powered by GitHub Issue Mirror