Nginx log format for multiple hosts


#1

Does anyone have a approved log file format for nginx saving several hosts to the same file. I have tried the server defined one of ‘combined’ however that does not log the hostname for some reason.

I therefore assume I need to specify the log format manually, can anyone tell me the best format for nginx.


(Matthieu Aubry) #2

You shouldn’t have to setup the log format manually and it should detect automatically.


#3

Hi Matt,

Thanks for the reply, it cannot detect what is not there and the combined log format simply does not inculde a hostname. Here is an example of the defined combined format for nginx 1.7.3

0.0.0.0 - - [16/Jul/2014:17:52:52 +0100] “GET /revive-images/2cec44dfe6b7a6f63bca076fc5b47638.jpg HTTP/1.1” 200 98446 “http://www.domain.co.uk/” “Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:19.0) Gecko/20100101 Firefox/19.0”

Or do you mean I can create my own log format and just hope that PiWIK understands it.

Stephen


(Matthieu Aubry) #4

If importing your log format does not work, checkout the list of opened issues:

maybe you could add a comment to one, otherwise create new issue with example log file and how to reproduce the issue