Wednesday, January 25, 2012

LogFormat for nginx in awstats

I wanted to run a large pre-existing nginx log through awstats. The log format given here didn't work for me; instead I used
%host - - %time1 %methodurl %code %bytesd %refererquot %uaquot

for logs that looked like:
host.host.host.host - - [20/Apr/2011:15:54:40 -0400] "GET / HTTP/1.1" 200 151 "-" "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_7; en-US) AppleWebKit/534.16 (KHTML, like Gecko) Chrome/10.0.648.205 Safari/534.16"