Hello,
I've tried to run a simple real time report like this:
goaccess -f access.log -o report.html --real-time-html --ws-url=goaccess.io
The problem is that my nginx vhost is running in SSL and I get the following error on the console:
report.html:1111 Mixed Content: The page at 'https://testing.com/report.html' was loaded over HTTPS, but attempted to connect to the insecure WebSocket endpoint 'ws://testing.com:7890/'. This request has been blocked; this endpoint must be available over WSS.setWebSocket @ report.html:1111
report.html:1111 Uncaught SecurityError: Failed to construct 'WebSocket': An insecure WebSocket connection may not be initiated from a page loaded over HTTPS.
I searched in the documentation for SSL and HTTPS but couldn't find anything, so for now I'm limited to HTTP?
Thanks!
Hello,
That's correct. SSL is not yet supported. I need to implement this to the websocket server. Implementing this shouldn't be too bad, it would probably require openssl.
Stay tuned!
Just learned about and tried out GoAccess for the first time tonight; ran into the same problem. Definitely looking forward to this feature being added, as I really like what I've seen so far, but don't want to have to support non-SSL access to the report.
+1 for wss://
Thanks for GoAccess, such a well designed and useful utility for watching my Nginx logs.
Please could you add a note on the documentation at https://goaccess.io/man#examples and https://goaccess.io/faq that only http can be used for realtime reporting.
This had me going in circles for a while until I found this issue and realised I had to just setup a separate domain that runs on http with all .html and realtime reports located there.
Static reports work fine over SSL but not the realtime.
Just wanted to chime in as well - GoAccess is a fantastic piece of software! Thank you!
I experimented with reverse-proxying the realtime endpoint over Nginx with TLS but was unable to get it working, my understanding is wss:// is needed so some modifications would have to be made to the generated HTML for it to work, at the very least.
@mitchellkrogza Thanks. I have added the notes to those two pages.
@stefanmb I've been working on this so I expect to have wss:// support soon. I may need to push out a minor release before deploying this change though.
Hello, I'm using goaccess to parse a log from an https server, and to show real time report over an other not-https website. The report is loaded with data, but it seems like a static one, infact it has a flag "Disconnected". Is this related to HTTPS issue? Or am I missing something?
@evemilano If your report is being served through an https‎ address such as https://site.com/report.html you won't be able to use the real time functionality at the moment. If it's through an http site, then it should work fine.
the report is published in http://app.example.com/report.html and it takes the log from https://example.com. Should it work? Because it doesn't :(
If it's showing as disconnected, then sounds like your browser is not able to establish a connection with the WebSocket server. Please take a look at your browser’s console and post back any errors there may be.
A note for a quick workaround until wss is implemented.
In Chrome you can just click the shield in the far right of the address bar and 'allow unsafe scripts' but in Firefox you need to go to 'about:config' and then set 'network.websocket.allowInsecureFromHTTPS' to true.
TLS/SSL has been implemented. Feel free to build from development for testing this out.
It will be pushed out in the upcoming version (which I expect to release soon).
Just for the record, it needs to be built as:
$ ./configure --enable-geoip --enable-utf8 --with-openssl
$ make
# make install
and run as:
# goaccess -f access.log -o report.html --real-time-html --ws-url=wss://<host> --ssl-cert=<cert> --ssl-key=<priv.key>
Superb stuff - shall give this a go when I have a bit of time.
This has been shipped in v1.1 which is out now :)
Most helpful comment
TLS/SSL has been implemented. Feel free to build from development for testing this out.
It will be pushed out in the upcoming version (which I expect to release soon).