Closed whatthehellisgoingon closed 3 years ago
when websocks connection in nginx https reverse proxy,please dont't set --ssl-cert=<path/cert.crt> and --ssl-key=<path/priv.key> in goaccess.conf or command line argument。otherwise it will show connection failed in chrome browser!!! following is nginx https reverse proxy conf
server {
listen 443 ssl;
....
location /goaccess_access {
add_header Content-Security-Policy "script-src 'self' 'unsafe-inline' 'unsafe-eval'; style-src 'self' 'unsafe-inline'" always;
alias /var/www/html/goaccess/;
index access_report.html;
}
location /wss/ {
proxy_pass http://127.0.0.1:7890;
proxy_connect_timeout 5m;
proxy_send_timeout 5m;
proxy_read_timeout 5m;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Connection "keep-alive";
proxy_pass_request_headers on;
proxy_http_version 1.1;
}
}
following is goaccess conf and command line argument
log-format COMBINED
html-report-title My Awesome Web Stats
daemonize true
pid-file /var/run/goaccess.pid
real-time-html true
db-path /var/www/html/goaccess/
persist true
restore true
goaccess -f /var/log/nginx/myexample.com.access.log /var/log/nginx/access.log -o /var/www/html/goaccess/access_report.html --ws-url=wss://www.myexample.com:443/wss/ --addr=127.0.0.1
i have solved by myself,thanks。
Just for the record on this, you can always use --addr=<addr>
and specify the IP address to bind server to.
hi, @allinurl . I have been view those issues #1297 #1133 #1328 ,all of those goaccess address bind in 0.0.0.0,not bind in 127.0.0.1.how to make websocks connection works in nginx reverse proxy when goaccess address is binding in localhost(127.0.0.1)? wait for your response.