This information is my experience. Unfortunately I'm not a professional who could give advice to anyone.
GoAccess is an open source real-time web log analyzer and interactive viewer that runs in a terminal in *nix systems or through your browser.
I installed goaccess with agp-get then I found out it was an outdated version. So I followed the install instructions on the project's website to install the newest version, from git.
On the go I realised I was missing some packages:
sudo apt-get install gcc autoconf gettext autopoint gawk libncursesw5-dev libgeoip-dev
Then I built with GitHub typing the commands following the instructions, all with sudo.
$ git clone https://github.com/allinurl/goaccess.git $ cd goaccess $ autoreconf -fi $ ./configure --enable-utf8 --enable-geoip=legacy $ make $ make install
I run goaccess and it displayed only the current day's statistics both in terminal and in html output. I googled the answer here. I edited the config file (default time, date and log format).
Then I run this code, and it finally worked.
zcat -f /var/log/nginx/access.log* | sudo goaccess -o /var/www/html/report.html