I have configured apache2 behind varnish and am trying to add stats by log reading (piwik)
however piwik complains log is "malformed"... and its correct :
89.79.******, 89.79.****** - - [31/Mar/2014:12:50:05 +0200] "GET / HTTP/1.1" 200 16310 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.154 Safari/537.36"
as you can see it logs the same ip twice as host...
in varnish .vcl i have :
remove req.http.X-Forwarded-For;
set req.http.X-Forwarded-For = client.ip;
and in apache2 vhost :
LogFormat "%{X-Forwarded-For}i %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" varnishcombined
CustomLog ${APACHE_LOG_DIR}/e***o-access.log varnishcombined
however it still logs the ip twice ...
what can i do to prevent that ?