goaccess安装和使用
安装依赖
$ sudo apt-get install libncursesw5-dev
$ wget https://github.com/maxmind/geoip-api-c/releases/download/v1.6.11/GeoIP-1.6.11.tar.gz $ tar -xzvf GeoIP-1.6.11.tar.gz $ cd GeoIP-1.6.11 $ ./configure $ make # make install
安装
1 2 3 4 5 6 | $ wget https: //tar.goaccess.io/goaccess-1.3.tar.gz $ tar -xzvf goaccess-1.3.tar.gz $ cd goaccess-1.3/ $ ./configure --enable-utf8 --enable-geoip=legacy $ make # make install |
配置 Nginx
1 2 3 4 5 6 7 8 9 10 11 | location /report.html { alias /home/zopen/nginx/html/report.html; #指定个人配置的目录 }#转发websocket请求<br>location /goaccess { proxy_pass http: //127.0.0.1:7890; proxy_set_header Host $http_host; proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header X-Real-IP $remote_addr; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade" ; } |
启动
1 | --ws-url 需要改成自己的host+端口 如果是80 一定要加上 |
1 | $ /usr/bin/goaccess /usr/local/nginx/logs/nginx.log -o / var /html/report.html --real-time-html --time-format= '%H:%M:%S' --date-format= '%d/%b/%Y' --daemonize --ws-url=host:80/goaccess |
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· AI与.NET技术实操系列:基于图像分类模型对图像进行分类
· go语言实现终端里的倒计时
· 如何编写易于单元测试的代码
· 10年+ .NET Coder 心语,封装的思维:从隐藏、稳定开始理解其本质意义
· .NET Core 中如何实现缓存的预热?
· 分享一个免费、快速、无限量使用的满血 DeepSeek R1 模型,支持深度思考和联网搜索!
· 基于 Docker 搭建 FRP 内网穿透开源项目(很简单哒)
· ollama系列01:轻松3步本地部署deepseek,普通电脑可用
· 25岁的心里话
· 按钮权限的设计及实现