GoAccess is a powerful tool that enables you to generate real-time web server logs analysis. In this tutorial, we will show you how to install GoAccess on your Ubuntu Server Latest distribution.
Before proceeding, ensure that you have the following:
It is important to update your server to ensure Ubuntu package repositories are up-to-date.
To update, run the following command:
sudo apt-get update
sudo apt-get upgrade
GoAccess is available in the Ubuntu repository. To ensure you get the latest version, add the GoAccess repository to your server's sources.
Run the following commands to add GoAccess and install it:
wget -O - https://deb.goaccess.io/gnugpg.key | sudo apt-key add -
echo "deb https://deb.goaccess.io/ $(lsb_release -cs) main" | sudo tee -a /etc/apt/sources.list.d/goaccess.list
sudo apt-get update
sudo apt-get install goaccess
After installation, you need to configure your web server to redirect access logs to GoAccess.
For example, to configure Apache2, edit the Apache2 configuration file:
sudo nano /etc/apache2/apache2.conf
Add the following lines:
# GoAccess
CustomLog "| goaccess /var/log/apache2/access.log -a" common
Save and close the file.
Finally, restart Apache2:
sudo service apache2 restart
You can now run GoAccess with the following command:
sudo goaccess /var/log/apache2/access.log -a
This command will generate an HTML report that provides interactive insights into your web server logs.
You can access the report by opening the generated report.html
file in a web browser.
With GoAccess, you can easily track your server's traffic and get detailed insights into web server logs effectively. You can install this tool on your Ubuntu Server 20.04 with ease by following this tutorial.
If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!
Alternatively, for the best virtual desktop, try Shells!