Created
September 6, 2019 16:59
-
-
Save alexishida/1004a0600b02f4acd5a2bfa244cd453a to your computer and use it in GitHub Desktop.
GoAccess NCSA Combined Log Format with Virtual Host NGINX
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# NCSA Combined Log Format with Virtual Host | |
# nginx.conf | |
# https://goaccess.io/man#interactive-keys | |
log_format vcombined '$host:$server_port ' | |
'$remote_addr $remote_user [$time_local] ' | |
'"$request" $status $body_bytes_sent ' | |
'"$http_referer" "$http_user_agent"'; | |
access_log /var/log/nginx/access.log vcombined; | |
# Log | |
goaccess access.log --log-format='%v %h - %^[%d:%t %^] "%r" %s %b "%R" "%u"' --date-format=%d/%b/%Y --time-format=%T -o report.html | |
# Realtime log | |
goaccess access.log --log-format='%v %h - %^[%d:%t %^] "%r" %s %b "%R" "%u"' --date-format=%d/%b/%Y --time-format=%T -o report.html --real-time-html |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment