Servers configuration for wan access to piwik website

I just finished installation of a piwik instance on one of our server.
Everything seems to run fine as I can already follow statistics for 2 of our website.
The piwik instance is installed on a LAMP (Centos ) server residing into our LAN.
As piwik server is not the “front” webserver. I created a proxy (virtualhost) redirection on the “front” server to the piwik server.
My problem is that I can’t access (login) into piwik if I try to connect from outside our LAN (using a FQDN). The login prompt appear but we are not able to access to dashboard.
A message appear pretending "La vérification de sécurité du formulaire a échoué. Veuillez recharger le formulaire et vérifier que les cookies sont activés. Si vous utilisez un serveur proxy, vous devez configurer Piwik pour accepter les en-têtes de proxy qui redirigent les en-têtes de l’hôte."
I tried all the options available into the FAQ without success.

If i’m using LAN IP adres, no problem to connect to piwik server.

Here is the proxy redirection set into the httpd.conf file on front server :
ServerName piwik.xxxx.xx
ProxyPass /
ProxyPassReverse /

Any help or suggestion will be of great help.


Keys2it (Laurent)

In your config/config.ini.php, you have to configure the proxy headers to be recognized by Piwik. (More examples in global.ini.php.)

proxy_client_headers[] = HTTP_X_FORWARDED_FOR
proxy_host_headers[] = HTTP_X_FORWARDED_HOST