Salut les gens
Je me tape la tête sur le bureau ici car je ne parviens pas à formater le journal NginX par défaut d'Easy Engine dans 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"';
Sortie réelle :
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)"
Aucun des lecteurs de journaux standard ne fonctionne et ma dernière tentative a été :
format d'heure %H:%M:%S
format de date %d/%b/%Y
format de journal %h - %^ [%d:%t %^] "%r" %s %b "%R" "%u" %T "%^"
Ce qui donne l'erreur :
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
Au secours, s'il vous plait, cerise sur le gâteau.
Y a-t-il une option pour vous d'ajouter la connexion par défaut d'EasyEngine NginX à la construction ?
Cela devrait le faire :
%h %^[%d:%t %^] %v "%r" %s %b "%R" "%u"
%d/%b/%Y
%T
Fonctionne parfaitement.
Étant donné qu'il s'agit de la valeur par défaut pour toute configuration Easy Engine de NginX, serait-il possible de l'ajouter dans les options de journalisation par défaut ?
Tu m'as sauvé la journée !