From 38dff5c66360454ea1e4c73e8551dd0acb576cc5 Mon Sep 17 00:00:00 2001 From: Mitja Felicijan Date: Mon, 25 Jan 2021 21:42:32 +0100 Subject: Added post about goaccess --- posts/2021-01-25-goaccess.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/posts/2021-01-25-goaccess.md b/posts/2021-01-25-goaccess.md index 5067519..b5d40e9 100644 --- a/posts/2021-01-25-goaccess.md +++ b/posts/2021-01-25-goaccess.md @@ -95,6 +95,14 @@ If you are using Debian like system GoAccess should be available in repository. apt install goaccess ``` +To enable Geo location we also need one additiona thing. + +``` +cd /var/www/html/stats.stats.com +wget https://github.com/texnikru/GeoLite2-Database/raw/master/GeoLite2-City.mmdb.gz +gunzip GeoLite2-City.mmdb.gz +``` + Now we create a shell script that will be executed every 10 minutes. ```sh @@ -112,6 +120,7 @@ goaccess \ --log-file=/var/log/nginx/access-all.log \ --log-format=COMBINED \ --exclude-ip=0.0.0.0 \ + --geoip-database=/var/www/html/stats.domain.com/GeoLite2-City.mmdb \ --ignore-crawlers \ --real-os \ --output=/var/www/html/stats.domain.com/index.html -- cgit v1.2.3