Server Stats without CGI

I'm idly considering switching from Apache2 to Nginx in the future. Strangely enough, the worst roadblock here seems to be the lack of support for CGI. I don't use CGI for much, but the most obvious use right now is awstats, which processes my server logs.

The nginx wiki lists some hacks for using fastcgi wrappers to run cgi scripts, but in the interest of examining all options, what other log analysis tools out there that give some nice stats, are easy to set up, and have a cgi-free web interface?

I'd use Google analytics but the privacy geek in me doesn't like the idea of (1) relying on javascript and (2) giving Google that information.

Please post both good experiences and bad. Thanks!

4 Replies

AWStats can be run as a cron job, generating static files

@mwalling:

AWStats can be run as a cron job, generating static files

mwalling's suggestion would be more secure. I've done a fair bit of Perl programming and the awstats code (at least the last time I looked at it) wasn't something I wanted to run as a CGI.

Not to start a debate about them here, but the Google Analytics terms of service are actually pretty decent. The biggest downside to me is the delay before stats are available.

If you can get over the JavaScript part, you might try Mint (commercial) or Piwik (open source), both of which would keep you in control of your data but provide more functionality than awstats.

@mwalling:

AWStats can be run as a cron job, generating static files

i've been doing that for a while now and it works like a charm.

i currently run it once a day but you can set the cron job to run e.g. every 5 minutes if you want the data that up-to-date.

Thanks, lots of food for thought as always. =)

I kinda like awstats cause it just works based on the server logs I already have, and with Perl that most Linux distros already have. (I'd rather it use Python, but blah blah Perl blah.)

Piwik looks pretty awesome, honestly. Unfortunately, it requires MySQL, a behemoth which kinda makes the whole Apache>nginx migration a moot point (I'd just be moving the load to another daemon).

To keep with the stated goals, I'll try running awstats on a cron job to generate static files. I'll be interested in at least exploring Piwik and Google Analytics further though, based on your suggestions.

Thanks again!

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct