GoAccess - 可视化 Web 日志分析工具
Centos安装:
yum -y install goaccess
使用goaccess命令生成HTML文件
LANG="en_US.UTF-8" bash -c 'goaccess /usr/local/nginx/logs/access.log -o /usr/local/nginx/html/report.html --real-time-html --log-format=COMBINED'
注意修改标红的部分,log日志所在的路径,生成的html页面保存在哪里
--real-time-html 表示实时更新,需要能够访问7890端口
report.html文件生成后配置nginx server { listen 99; access_log ./logs/report_access.log main; error_log ./logs/report_error.log error; root /usr/local/nginx/html;
autoindex on;
autoindex_exact_size off;
location / { try_files $uri $uri/ /report.html;
}
}
打开浏览器访问Nginx服务器99端口即可!


浙公网安备 33010602011771号