Goaccess is a visual web log analyzer. Unlike AWStats, you can get statistics instantly, so it comes very handy to have it installed.

Installation

a) Regular

_$: apt-get install goaccess

b) With PPA

_$: echo "deb http://deb.goaccess.io/ $(lsb_release -cs) main" \
    | sudo tee -a /etc/apt/sources.list.d/goaccess.list
_$: wget -O - http://deb.goaccess.io/gnugpg.key | sudo apt-key add -
_$: apt-get update
_$: apt-get install goaccess

Configuration

/etc/goaccess.conf:
-------------------
######################################
# Time Format Options (required)
######################################
#
# The hour (24-hour clock) [00,23]; leading zeros are permitted but not required.
# The minute [00,59]; leading zeros are permitted but not required.
# The seconds [00,60]; leading zeros are permitted but not required.
# See `man strftime` for more details
#
# The following time format works with any of the
# Apache/NGINX's log formats below.
#
time-format %H:%M:%S

...

######################################
# Date Format Options (required)
######################################
#
# The date-format variable followed by a space, specifies
# the log format date containing any combination of regular
# characters and special format specifiers. They all begin with a
# percentage (%) sign. See `man strftime`
#
# The following date format works with any of the
# Apache/NGINX's log formats below.
#
date-format %d/%b/%Y

...

######################################
# Log Format Options (required)
######################################
#
# The log-format variable followed by a space or \t for
# tab-delimited, specifies the log format string.
#
# NOTE: If the time/date is a timestamp in seconds or microseconds
# %x must be used instead of %d & %t to represent the date & time.

# NCSA Combined Log Format
#
log-format %h %^[%d:%t %^] "%r" %s %b "%R" "%u"

...

Usage

_$: goaccess -f /var/log/nginx/access.log
_$: goaccess -f /var/log/nginx/error.log