Piwik behind a nginx proxy



I’m running the last version of piwik behind a proxy.
My architecture :
Nginx -> apache

In the Piwik interface I have the nginx IP instead of the visitor IP.

I try to put this ligne in the config.ini.php
proxy_client_headers[] = HTTP_X_FORWARDED_FOR
But it’s not working

In the phpinfo() I see the visitor IP in the HTTP_X_FORWARDED_FOR Variable.

Could you help me.


(vipsoft) #2

It has to be in a section named “General”, e.g.,

proxy_client_headers[] = HTTP_X_FORWARDED_HOST


Thank’s but it’s not working …


I found some days after, the solution is to read corectly the documentation :wink:

and adding :

assume_secure_protocol = 1