Goaccess: How to run GoAccess with SSL support?

Created on 8 Mar 2017  路  12Comments  路  Source: allinurl/goaccess

Hi everyone,
i'm trying to run GoAccess in live mode and i would like to be able to catch those data using SSL, so i'm trying to use --ssl-cert and --ssl-key but apparently the error i've got is that the --ssl-cert is not a valid option.

This is the command i'm using with related error:

/usr/local/goaccess/bin/goaccess -f /var/log/httpd/domains/HOST.log -o /home/admin/domains/HOST/private_html/web.html --real-time-html --ws-url=HOST --ssl-cert=/usr/local/directadmin/data/users/admin/domains/sHOST.cert --ssl-key=/usr/local/directadmin/data/users/admin/domains/HOST.key

Error:

/usr/local/goaccess/bin/goaccess: unrecognized option '--ssl-cert=/usr/local/directadmin/data/users/admin/domains/HOST.cert'

My goal would be to have live data for the whole server (for now i'm testing just with a single log file) from the url https://HOST/web.html

I'm not 100% sure that the ssl part is actually needed, because Apache would take care of the SSL cert, but i'm not sure if i'm doing something wrong and what.

Thanks
Best regards
Andrea

build documentation

Most helpful comment

Great question. You can specify it using --ws-url=host, e.g.,

--ws-url=wss://host:7890

All 12 comments

It looks like you didn't build GoAccess with --with-openssl support. You also need to install libssl-dev (in debian/ubuntu) before building goaccess. Please take a look at this table to determine the OpenSSL package you need.

Once you have installed the dev libraries for OpenSSL, you need to build goaccess as:

$ ./configure --enable-utf8 --enable-geoip=legacy --with-openssl
$ make
# make install

Then you should be able to run the command you posted above.

Hi, thanks for that, it now start without error, but when i try to rech the page the page is just a loading "circle" with no data.

Also, what is the config value to run it in daemon mode?

Thanks

Please take a look at your browser's console (Ctrl+Shift+j) and see if there are any errors. To run as a daemon, you can use --daemonize and make sure you are using absolute paths.

Ok, i did check the network tab but not the console, the error is that is trying to conntect over http despide the ssl config:

Mixed Content: The page at 'https://HOST/web.html' was loaded over HTTPS, but attempted to connect to the insecure WebSocket endpoint 'ws://HOST:7890/'. This request has been blocked; this endpoint must be available over WSS.

How do i need to set the ws path to specify ssl?

Great question. You can specify it using --ws-url=host, e.g.,

--ws-url=wss://host:7890

Ok! There we go! :) Now it's showing live informations :)

Thank you very much.

Let's say that now i wanna create an init script or a service to manage the daemon and keep the configuration file as the place where to get all the info (apparently exluding demonize but that shoudln't be a problem), as menthioned in a previous thread i cannot set the log-file path as *.log because i need to exlude *.error.log and there is no such a function.

If i try to use *.log in the log-file definition inside the config, it does'nt work.

Is that something i will always need to pass via command line using -f?

Thanks

Side note, i've masquerated the host, can you please do the same on your last reply? ^^

Thanks

In the config file you should be able to specify multiple log-file variables. The *.log is not possible in the config file since the actual expansion is done by the shell.

I see, manually set the files is quite hard because of multiple domains and a file per-domain, i'll check if i can run a script before start the service to "compile" the config file so :)

Thanks

Closing this. Feel free to reopen it if needed.

how can i define in my config file --with-openssl

@zOthix please build goaccess using --with-openssl then use --ssl-key=<path/priv.key> and --ssl-cert=<path/cert.crt>

Was this page helpful?
0 / 5 - 0 ratings

Related issues

g33kphr33k picture g33kphr33k  路  3Comments

konungrl picture konungrl  路  3Comments

narayan1599 picture narayan1599  路  3Comments

DestinyWang picture DestinyWang  路  3Comments

securixhk picture securixhk  路  3Comments