@dandv opened this Issue on July 3rd 2015 Contributor

I'm reverse proxying from an https site to a Piwik installation for a domain without an SSL cert:

location /piwi {
    rewrite ^/piwi(/?.*)$ $1 break;
    proxy_set_header Host piwik.idorecall.com;
    proxy_set_header X-Real-IP $remote_addr;  # TODO Piwik doesn't know about this cache header, so all requests appear as from this very server
    proxy_pass http://piwik.idorecall.com;

I've read How do I configure Piwik when the server is installed behind a proxy? but didn't manage to figure out what the exact settings should be for nginx. Now because of the proxying, Piwik tracks all visits as coming from the server that hosts the app.

@halfdan commented on July 3rd 2015 Member

@dandv You need to make Piwik aware of the X-Real-IP header. As shown in the FAQ add an entry under [General] with proxy_client_headers[] = X-REAL-IP

@tsteur commented on July 5th 2015 Member

Is this issue resolved?

@halfdan commented on July 6th 2015 Member

Closing as solved. @dandv reopen if there are open questions.

This Issue was closed on July 6th 2015
Powered by GitHub Issue Mirror