Occasionally I wonder if anyone actually visits this site. So several years ago I went to find something that would help me watch my web logs.
The solution I found was GoAccess. It is an interactive program that behaves like
top when you run it in a terminal against your /var/log/nginx or /var/log/httpd directories.
GoAccess is packaged in every major OS:
It can also statically create a report:
cat /var/log/nginx/access.log > /tmp/report/access.log
zcat /var/log/nginx/access.log.*gz >> /tmp/report/access.log
goaccess /tmp/report/access.log --log-format=COMBINED --ignore-crawlers --real-os --geoip-database /var/www/GeoLite2-City.mmdb -o /var/www/index.html
rm -rf /tmp/report
I put the above simple script into Cron:
15 6 * * * /home/www-data/report.sh &>/dev/null
And yes, there are occasionally one or two folks who visit.