From 0c571e15ada243d90531949715bdc3d3ae2fbd55 Mon Sep 17 00:00:00 2001 From: escfrpls Date: Sun, 10 May 2026 15:14:34 +0200 Subject: new notes --- GoAccess.md | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 GoAccess.md (limited to 'GoAccess.md') diff --git a/GoAccess.md b/GoAccess.md new file mode 100644 index 0000000..b079469 --- /dev/null +++ b/GoAccess.md @@ -0,0 +1,32 @@ +# GoAccess – HTTP log monitoring for OpenBSD + +This guide sets up GoAccess to analyse httpd(8) access logs in real time via a +simple HTML report. The report is updated from a cron job and served by the +same web server. + +## Installation + +```bash +doas pkg_add goaccess + +Collect logs for a specific domain + +Assume logs for your_domain are stored in /var/www/logs/access.log. +Create a report directory and generate the first report: +bash + +doas mkdir -p /var/www/htdocs/you_www/stats +doas goaccess /var/www/logs/you_www.log -o /var/www/htdocs/you_www/stats/index.html --log-format=COMBINED +doas chown -R www:www /var/www/htdocs/report + +doas chown -R www:www /var/www/htdocs/drohiczyn-poleski/stats +doas chmod 755 /var/www/htdocs/drohiczyn-poleski/stats + +Automatic daily update with cron + +Add the following line to root's crontab (doas crontab -e): +text + +0 * * * * /usr/local/bin/goaccess /var/www/logs/you_www/.log -o /var/www/htdocs/you_www//stats/index.html >/dev/null 2>&1 + +Now visit https://your_domain/report/ to see the statistics. -- cgit v1.2.3