Showing LB ip on Piwik dashboard


Hi Guys,

I have configured our analytic interface using piwik which was working perfectly till the morning ( My setup was Haproxy + apache + php )

Today, I have moved piwik analytic to nginx server which is Haprpxy + Nginx (Frond End) + php-fpm (backend). For movement of piwik to Nginx, I used our existing nginx configuration. However after shifting traffic to Nginx server, Piwik dashboaard showing LB internal IP in visitor log. I am not getting any clue, How do i solve this issue.

Please let me know, if any other information is required.
Please suggest

This is from piwik.conf

    access_log /etc/nginx/logs/piwik-analytic-access.log common;
    #access_log /etc/nginx/logs/piwik-analytic-access.log;
    error_log /etc/nginx/logs/piwik-analytic-error.log;


This is from nginx.conf
# Logging Settings
log_format main ‘$remote_addr - $remote_user [$time_local] ‘
’"$request" $status $bytes_sent ‘
’"$http_referer" “$http_user_agent” ‘

    log_format common   '$http_x_forwarded_for - $remote_user [$time_local]  '
  '"$request" $status $bytes_sent '
  '"$http_referer" "$http_user_agent" "$request_time" '


This is from piwik config.ini.php

session_save_handler = "dbtable"
proxy_client_headers[] = "HTTP_X_FORWARDED_FOR"
proxy_host_headers[] = "HTTP_X_FORWARDED_HOST