summaryrefslogtreecommitdiff
path: root/GoAccess.md
diff options
context:
space:
mode:
authorescfrpls <licwin1410@gmail.com>2026-05-10 15:14:34 +0200
committerescfrpls <licwin1410@gmail.com>2026-05-10 15:14:34 +0200
commit0c571e15ada243d90531949715bdc3d3ae2fbd55 (patch)
treeba26b5ead5791e64d88bdabaa3419104a70b37fc /GoAccess.md
parent06e5ac75283d735aadcf42b4e3af3b50c6592697 (diff)
new notesHEADmaster
Diffstat (limited to 'GoAccess.md')
-rw-r--r--GoAccess.md32
1 files changed, 32 insertions, 0 deletions
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.