I've been pulling my hair with this script:
#!/bin/bash
echo Content-type: text/html
echo ""
goaccess -f /var/www/log/access.log -a | tee
Which runs perfectly on the command line (generates HTML output for access.log), but when I run it as a CGI via the URL, the output isn't the HTML I'm expecting from GoAccess web analyzer but rather:
GoAccess - 0.7
Usage: goaccess -f log_file [-c][-r][-m][-h][-q][-d][...]
The following options can also be supplied to the command:
-f - Path to input log file.
<snipped>
It is as if it's running goaccess
without any parameters. Either that, or the parameters I specify in my Bash CGI aren't being seen for whatever reason.
I'm at the end of my wits. Any people w/some CGI experience that can help?