- https://www.digitalocean.com/community/tutorials/how-to-install-and-use-goaccess-web-log-analyzer-on-ubuntu-20-04
- https://kifarunix.com/install-goaccess-on-ubuntu-18-04-debian-10-buster/
- ai fonts-font-awesome goaccess
- ln -s /usr/share/fonts-font-awesome/fonts/
- l /var/www/goaccess
- htpasswd
/etc/goaccess/goaccess.conf
time-format %H:%M:%S
date-format %d/%b/%Y
log-format %h %^[%d:%t %^] "%r" %s %b "%R" "%u"
log-file /var/log/nginx/access.log
output /var/www/goaccess/analyzer.html
/etc/cron.weekly/goaccess
#!/bin/sh
# Version: 1.2
# Description: Generate GoAccess reports for various Nginx logs
LOGFILE="/var/log/goaccess-cron.log"
# Run goaccess commands in parallel
nohup goaccess /var/log/nginx/access.log.1 -o /var/www/goaccess/access.html >> $LOGFILE 2>&1 &
nohup goaccess /var/log/nginx/drupal_access.log.1 -o /var/www/goaccess/drupal.html >> $LOGFILE 2>&1 &
nohup goaccess /var/log/nginx/peertube_access.log.1 -o /var/www/goaccess/peertube.html >> $LOGFILE 2>&1 &
nohup goaccess /var/log/nginx/webradio_access.log.1 -o /var/www/goaccess/webradio.html >> $LOGFILE 2>&1 &
nohup goaccess /var/log/nginx/site_access.log.1 -o /var/www/goaccess/site.html >> $LOGFILE 2>&1 &
# Wait for all background jobs to complete
wait
/etc/nginx/sites-available/analyzer.DOM.TLD.conf
server {
server_name analyzer.DOM.TLD;
root /var/www/goaccess/;
index analyzer.html;
add_header Strict-Transport-Security max-age=31536000;
location / {
auth_basic "Restricted";
auth_basic_user_file /etc/nginx/.htpasswd;
}
listen 80;
}