Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Goaccess Web Problem #2718

Open
Hyungzn opened this issue Sep 18, 2024 · 2 comments
Open

Goaccess Web Problem #2718

Hyungzn opened this issue Sep 18, 2024 · 2 comments

Comments

@Hyungzn
Copy link

Hyungzn commented Sep 18, 2024

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
Copy link
Owner

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
Copy link
Author

Hyungzn commented Sep 20, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants