putting awstats live on a long hosted website

By | December 4, 2015

Search /home/awstats/DirData/ for any files relating to the domain you’re dealing with and are newer than those for which you have logs.

eg…

ll /home/awstats/DirData/awstats*.www.example.com.txt

ll /home/awstats/DirData/awstats*2015.www.example.com.txt

and then either remove them (if you know you can recreate them) or move them to a temp location

rm /home/awstats/DirData/awstats122015.www.example.com.txt

mv /home/awstats/DirData/awstats*.www.example.com.txt /tmp/awstats.tmp/

Unzip all your log files

cd /log/directory/

gunzip access.log.*

/usr/local/www/awstats/tools/logresolvemerge.pl access.log.* > access-history.log

gzip access.log.*

Edit your /usr/local/etc/awstats/awstats.www.example.com.conf file and point LogFile to access-history.log

Run awstats_updateall

/usr/local/www/awstats/tools/awstats_updateall.pl now -configdir=/usr/local/etc/awstats/

Check stats are now as you expect

https://www.example.com/awstats/awstats.pl

Edit your /usr/local/etc/awstats/awstats.www.example.com.conf file and point LogFile to access.log again

Run awstats_updateall to get most recent data

/usr/local/www/awstats/tools/awstats_updateall.pl now -configdir=/usr/local/etc/awstats/

Check stats are now as you expect

https://www.example.com/awstats/awstats.pl

 

Delete access-history.log