ISPConfig GoAccess

Installation - https://www.howtoforge.com/tutorial/ubuntu-goaccess-apache-log-analyzer/ <code bash> wget -O - https://deb.goaccess.io/gnugpg.key | apt-key –keyring /etc/apt/trusted.gpg.d/goaccess.gpg add - echo “deb http://deb.goaccess.io/ $(lsb_release -cs) main” | tee -a /etc/apt/sources.list.d/goaccess.list apt-get update -y apt-get install goaccess -y </code>

Page de manuel GoAccess - https://goaccess.io/man

Téléchargement de la base GeoIP gratuite : https://db-ip.com/db/download/ip-to-city-lite <code bash> gunzip dbip-city-lite-2022-10.mmdb.gz mv dbip-city-lite-2022-10.mmdb /usr/local/share/GeoIP/GeoLiteCity.mmdb </code>

Regénérer un rapport manuellement <code bash> cd /var/www/alliance-editeurs.org/log LANG=frFR.UTF-8 goaccess -f access.log –config-file goaccess.conf –restore –persist –db-path=goaccessdb –output=../web/stats/goaindex.html </code>

Hack

cf https://www.myriadinteractive.com/blog/view/id/29/conflict-between-apache-url-rewriting-and-basic-authentication

À la racine du site dans /web/.htaccess, ajouter : ErrorDocument 401 “Unauthorized access”

Dans le fichier .htaccess du site ajouter : <code bash> RewriteEngine On RewriteBase / RewriteRule ^stats($|/.*) - [END] </code>