GoAccess, A Real-Time Dashboard for Nginx Proxy Manager
The Nginx Proxy Manager generate logs of every connection made. With this data, GregYankovoy created a docker image that provides a real-time data dashboard. It can be run easily alongside the Nginx Proxy Manager.
If you have not set up Nginx Proxy Manager, check out my guide at the link below.
How to install GoAccess?
Run the command below at your Nginx Proxy Manager server terminal.
docker run --name goaccess -p 7889:7889 -v ~/nginx-proxy-manager/data/logs:/opt/log -v ~/goaccess:/config -d gregyankovoy/goaccessWhat does each of these means?
docker run --name goaccessto run a docker container and set the name asgoaccess-p 7889:7889is to host the docker image at the 7889 port-v ~/nginx-proxy-manager/data/logs:/opt/log, to bind the Nginx logs to the docker container log at/opt/log-v ~/goaccess:/config, to bind the image config directory to thegoaccessdirectory at your home directory-d gregyankovoy/goaccess, to run the container in the background and print container ID
You can check if the docker container is running by running docker ps command.
Add the log file to GoAccess
Now, the config file will be created at ~/goaccess/config/. Let's configure the config file.
mv goaccess.conf goaccess.conf.backupnano goaccess.confgoaccess.conf fileFor Nginx Proxy Manager, add the following lines to the goaccess.conf file.
time-format %H:%M:%S
date-format %d/%b/%Y
log_format [%d:%t %^] - %s %^ - %m %^ %v "%U" [Client %h] [Length %b] [Gzip %^] [Sent-to %^] "%u" "%R"
real-time-html true
log-file /opt/log/proxy-host-1_access.log
log-file /opt/log/proxy-host-2_access.log
log-file /opt/log/proxy-host-3_access.logSave the file and restart your goaccess docker image.
docker restart goaccessNavigate to your GoAccess page. Replace 127.0.0.1 with your IP address.
http://127.0.0.1:7889