You are not logged in.
Pages: 1
nginx-stats.sh v1.0 {2015-06-24} by Tux
Simple nginx web server access log stats, all and unique ip counters.
https://github.com/tuxy/bash/blob/master/nginx-stats.sh
--- Install ---
// download script to your server
sudo curl -s https://raw.githubusercontent.com/tuxy/bash/master/nginx-stats.sh -o ~/
// change script directories
txt='/home/web/pub/stats.txt'
dir='/var/log/nginx'
"txt" directory is where you're stats will be saved.
"dir" directory is for nginx access logs.
// set script execute permission
sudo chmod +x ~/nginx-stats.sh
// edit root crontab
sudo crontab -u root -e
// add script to root crontab
@hourly /home/user/nginx-stats.sh
// example output
Nginx Traffic Stats
~~~~~~~~~~~~~~~~~~~
All Hits ......: 9,541
Unique Hits ...: 1,335
Note you can also move this script to /root and use "~/nginx-stats.sh" in crontab instead.
Last edited by Tuxy (2015-07-02 16:50:14)
--{ Using Arch Linux Since 2011-10-25 }--
Keybase @ https://keybase.io/tuxy
GitHub @ https://github.com/tuxy
Offline
Are your packages in the AUR?
Offline
@karol, No just git :-) Why?
--{ Using Arch Linux Since 2011-10-25 }--
Keybase @ https://keybase.io/tuxy
GitHub @ https://github.com/tuxy
Offline
Pages: 1