Hi Folks
I'm banging my head on the desk here as I cannot get the Easy Engine default NginX log to format in goaccess. nginx.conf:
# Log format Settings
log_format rt_cache '$remote_addr $upstream_response_time $upstream_cache_status [$time_local] '
'$http_host "$request" $status $body_bytes_sent '
'"$http_referer" "$http_user_agent"';
Actual output:
66.249.79.119 - - [27/Mar/2017:07:51:28 -0400] www.argonon.com "GET /news/page/3/ HTTP/1.1" 301 178 "-" "Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)"
10.1.6.251 0.618 - [27/Mar/2017:07:51:49 -0400] argonon.com "GET /2012/04/30/leopard-films-ground-breaking-new-documentary-series-starts-today-monday-30th-april-11am-bbc1/ HTTP/1.1" 200 7978 "-" "Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)"
None of the standard log readers work and my last attempt was:
time-format %H:%M:%S
date-format %d/%b/%Y
log-format %h - %^ [%d:%t %^] "%r" %s %b "%R" "%u" %T "%^"
Which gives the error:
Token 'ET' doesn't match specifier '%s'
Token 'ET' doesn't match specifier '%s'
Token 'ET' doesn't match specifier '%s'
Token '[27/Mar/2017' doesn't match specifier '%d'
Token 'ET' doesn't match specifier '%s'
Token 'ET' doesn't match specifier '%s'
Token '[27/Mar/2017' doesn't match specifier '%d'
Token 'ET' doesn't match specifier '%s'
Token '[27/Mar/2017' doesn't match specifier '%d'
Token '[27/Mar/2017' doesn't match specifier '%d'
Format Errors - Verify your log/date/time format
Help, pretty please, cherry on top.
Is there an option for you guys to add EasyEngine NginX default logging in to the build?
This should do it:
%h %^[%d:%t %^] %v "%r" %s %b "%R" "%u"
%d/%b/%Y
%T
Works perfectly.
Since this is the default for any Easy Engine setup of NginX would it be possible to tack this in the default logging options?
You saved my day!