$AWSTATS -config=$c -output=$stat -staticlinks > $DIR/$c/$YEAR/$MONTH/awstats.$c.$stat.htmlĪnd of course, chuck it in cron so it updates regularly. $AWSTATS -config=$c -output=$stat -month=all -staticlinks > $DIR/$c/$YEAR/awstats.$c.$stat.html a nested for loop that creates reports for the year, and the month.Updates the stats $AWSTATS -config=$c -update.a new for loop, that creates a PHP file in the root directory, and the $YEAR directory. Next, let’s make sure logging is separate for each website: So, a few prerequisites are needed for Nginx to behave properly.įirstly, make sure you have PHP running using fastcgi (I’m not showing you how to do this in this doc). That’ll get you up and running ready to install from cpan.Ĭpan> install Geo::IP Setting up Nginx Now, while in the CPAN shell, let’s install some stuff.įirstly, CPAN itself, and then the GeoIP plugin. Log::Log4perl recommended for better loggingĬpan shell - CPAN exploration and modules installation (v2.28 ) So first we need to setup CPAN: $ sudo cpan Sudo aptitude install awstats libgeoip-dev build-essential openssl Installing the GeoIP plugin I’ll assume we store the static reports in /var/cache/awstats.I’ll assume we store the Awstats DB in /var/lib/awstats.Your linux server can be any flavour you like, I prefer Debian and Ubuntu distros, and I prefer aptitude as a package manager you can use whatever you like □. I will assume that you have a running server. I’m not going to talk you through setting up a Linux server, or Nginx, PHP-FPM (Fastcgi).
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |