Skip to content

Instantly share code, notes, and snippets.

@corentinbettiol
Last active August 24, 2023 12:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save corentinbettiol/b65239f12d9262b5a50ebe99e3ce0e45 to your computer and use it in GitHub Desktop.
Save corentinbettiol/b65239f12d9262b5a50ebe99e3ce0e45 to your computer and use it in GitHub Desktop.
Goaccess script to get a real-time html page with hostnames in requests.
tail -q -n +0 -f \
/var/log/apache2/logs-for-website-1.log \
/var/log/apache2/logs-for-website-2.log \
/var/log/apache2/logs-for-website-3.log \
/var/log/apache2/logs-for-website-4.log \
| awk '$8=$1$8' \
| goaccess \
--log-format='%v %h %l %u [%d:%t +%^] \"%r\" %>s %b \"%{Referer}i\" \"%{User-agent}i\"' \
--date-format=%d/%b/%Y \
--time-format=%T \
--anonymize-ip \
--anonymize-level=2 \
--html-report-title="Global stats" \
--html-refresh=15 -o /var/www/html/stats/index.html \
--real-time-html -
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment