Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/atmos/rawstats
run awstats under rack
https://github.com/atmos/rawstats
Last synced: 3 months ago
JSON representation
run awstats under rack
- Host: GitHub
- URL: https://github.com/atmos/rawstats
- Owner: atmos
- License: other
- Created: 2010-10-14T11:29:06.000Z (about 14 years ago)
- Default Branch: master
- Last Pushed: 2010-10-17T23:28:31.000Z (about 14 years ago)
- Last Synced: 2024-04-15T13:59:36.383Z (9 months ago)
- Language: Perl
- Homepage:
- Size: 660 KB
- Stars: 9
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
rawstats
========How to host [awstats](http://awstats.sourceforge.net/) under ruby or rack. You should only have to setup a daily cron job.
Running
-------% bundle install --binstubs
% bin/rackup
% open http://localhost:9292Config Options
--------------There's only two options, where your store your data and the command
used to grab your history from logs.### DirData Config Option
By default the data is set to `/local-data`. If you need to change that then you should export the `RAWSTATS_DATA_DIR` environmental variable, it'll automatically use that if set. For more information on this variable, checkout the [awstats docs on this option][dirdata].
### LogFile Config Option
By default the data is set to `gzip -c -d /var/log/nginx/access_logs/*.log.*.gz |`. If you need to change that then you should export the `RAWSTATS_LOG_COMMAND` environmental variable, it'll automatically use that if set. For more information on this variable, checkout the [awstats docs on this option][logfile].
Cron
----You only need to run `bin/daily` from a cron job, you can run it by hand if you want.
% bin/daily
I'm running it like this on my systems:
% crontab -l
0 8 * * * cd /home/atmos/pages-stats && bin/daily >> /home/atmos/pages-stats/cron.logLICENSE
-------The license is GPL because I have no clue how else to distribute awstats(which is GPL).
[dirdata]: http://awstats.sourceforge.net/docs/awstats_config.html#DirData
[logfile]: http://awstats.sourceforge.net/docs/awstats_config.html#LogFile