PIWIK installed behind a proxy

Hello everyone

My Environment:
Piwik 1.9.1
RedHat 6 x64 (2.6.32-279.5.2.el6.x86_64)
Apache/2.2.15
PHP 5.3

The Webserver is installed behind a proxy. I followed the instructions on Installation - Analytics Platform - Matomo but it doesn’t work. I tried every Option on the faq_98.
Every visit on a website comes from the same IP (for example: Visitors in Real-Time)

Does anyone has an idea what I could try next?

Thx for helping!

I’m not sure, maybe you didnt use options well, or maybe your proxy is misconfigured? Hard to say sorry. You can always contact Pro Services for further help troubleshoot your server or maybe someone will suggest here a solution.

Okay, the problem is resolved.

I had to modify the file piwik.php which I got from

How to - Analytics Platform - Matomo or precisely http://dev.piwik.org/svn/trunk/misc/proxy-hide-piwik-url/piwik.php

and then I had to change the value of the variable $_SERVER[‘REMOTE_ADDR’] to HTTP_X_FORWARDED_FOR

like this:
$url = $PIWIK_URL.“piwik.php?cip=”.@$_SERVER[‘HTTP_X_FORWARDED_FOR’]."&token_auth=".$TOKEN_AUTH.’&’;

thx anyway!

Cheers from Switzerland

thanks for the tip. Maybe we could modify the scrit itself to avoid other users having the error.

Is REMOTE_ADDR set in your case to the value of the server itself, or is it empty?