安装GoAccess
GoAccess官网:https://goaccess.io
# 安装依赖
yum install -y libmaxminddb-devel ncurses-devel
wget https://tar.goaccess.io/goaccess-1.8.1.tar.gz
tar -xzvf goaccess-1.8.1.tar.gz
cd goaccess-1.8.1/
./configure --enable-utf8 --enable-geoip=mmdb
make
make install
监控Nginx的access日志
./goaccess /root/nginx/logs/access.log -o ../html/report.html --real-time-html --time-format='%H:%M:%S' --date-format='%d/%b/%Y' --log-format=COMBINED
使用Nginx访问GoAccess可视化页面
location /report.html {
alias /root/goaccess/html/report.html;
}
Comments NOTHING