allinurl / goaccess

GoAccess is a real-time web log analyzer and interactive viewer that runs in a terminal in *nix systems or through your browser.
https://goaccess.io
MIT License
18.2k stars 1.1k forks source link

Goaccess Web Problem #2718

Open Hyungzn opened 3 days ago

Hyungzn commented 3 days ago

Hello~

I try to access Goaccess html page but it doesn't work.

I have two question, and these are my config for Nginx and Goaccess

  1. Which URL I can access to Goaccess Web browser? ex ) 121.156.46.51:7890 ? or 121.156.46.51:7890/goaccess ?? (my server IP is 121.156.46.51)
  2. What do I fix configuration?

Pleaese help me to solve problem.

[Nginx.conf -> Vhost for Goaccess] server { listen 80; server_name goaccess.mydomain.com; location /goaccess { root /var/www/html/goaccess/; } location /goaccess/ws { proxy_pass http://127.0.0.1:7890/goaccess/ws; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "Upgrade"; proxy_set_header Connection "keep-alive"; proxy_pass_request_headers on; }

[Goaccess.conf] datetime-format %d/%b/%Y:%H:%M:%S %z log-format %h %^[%x] [%T] %^"%r" %s %b "%R" "%u" %^ date-spec min port 7890 ws-url ws://goaccess.mydomain.com/goaccess/ws:80 output /var/www/html/goaccess/index.html

[root@OTNASDOWN01 nginx]# goaccess /local_cache/var/log/nginx/access_combined.log -o /var/www/html/goaccess/report.html --real-time-html [PARSING /local_cache/var/log/nginx/access_combined.log] {20,773} @ {2,596/s} WebSocket server ready to accept new client connections

Thank you.

allinurl commented 2 days ago

Simply place your HTML report in the web server's document root and navigate to http://mydomain.com/report.html. The 7890 port is used for the WebSocket connection, so if it’s running on the same machine as the web server, you won’t need to specify anything (no ws-url), and the WebSocket should connect without issues. However, if you're accessing the report via https://mydomain.com/report.html, you'll need to specify the SSL certificate and key using --ssl-cert=<path/cert.crt> and --ssl-key=<path/priv.key>.

Let me know if that helps.

Hyungzn commented 1 day ago

Hi Maybe I confused Web Dashboard(for NMS) with HTML Technically speaking, I want to access Goaccess Web page.

If I access to webpage, which URL i can use? then do I change my configuration? (nginx, goaccess.conf)

FYI, this is my goaccess configure commend. ./configure --enable-geoip=legacy --prefix=/usr/local --enable-utf8

0bi-w6n-K3nobi commented 15 minutes ago

Hi @Hyungzn

What exactly do you need? I believe that maybe not speak about same topic!

Well, in documentation here at Server Options, you can read about --ws-url= option. So, it is only for real-time html reporting. About this, you can read at Feature Pages here.

So, We talk about this? Or only how to show a html page resulting for GOAccess html reporting? Tell about do you need.