User Tools

Site Tools


blog:configure_awstats_on_debian_webserver

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
blog:configure_awstats_on_debian_webserver [2010-06-29 15:42] brbblog:configure_awstats_on_debian_webserver [2010-10-24 10:29] (current) brb
Line 22: Line 22:
  
 Make it a default that access.log has these permissions. Make it a default that access.log has these permissions.
 +
 +Locate the awstats_updateall.pl script (it is in /usr/share/doc/awstats/examples on debian) and make a symlink to /usr/local/bin for it. 
  
 Edit the /etc/logrotate.d/apache2 and make sure it has these lines  Edit the /etc/logrotate.d/apache2 and make sure it has these lines 
   create 644 root adm   create 644 root adm
   prerotate   prerotate
-    /usr/lib/cgi-bin/awstats.pl -config=awstats.www.mysite.org.conf  -update+        nice /usr/local/bin/awstats_updateall.pl -awstatsprog=/usr/lib/cgi-bin/awstats.pl now                                                                                     
   endscript   endscript
  
Line 42: Line 44:
         sharedscripts         sharedscripts
         prerotate         prerotate
-            /usr/lib/cgi-bin/awstats.pl -config=awstats.conf -update        endscript+           nice /usr/local/bin/awstats_updateall.pl -awstatsprog=/usr/lib/cgi-bin/awstats.pl 
         postrotate         postrotate
                 if [ -f /var/run/apache2.pid ]; then                 if [ -f /var/run/apache2.pid ]; then
Line 50: Line 52:
 } }
 </code> </code>
 +
 +Add the update command to cron.hourly:
 +  nice /usr/local/bin/awstats_updateall.pl -awstatsprog=/usr/lib/cgi-bin/awstats.pl 
  
 Reload apache  Reload apache 
Line 63: Line 68:
   http://www.mysite.com/logs   http://www.mysite.com/logs
  
 +If you have a lot of old compressed logfiles that you would to include, set the logfile path to:
 +  LogFile="zcat /var/log/apache2/servername.tld-access.log.*.gz |"
 +
 +And update the database. This will incorporate all old log entries. Don't forget to switch back to the last logfile!
  
 Ref: http://wiki.debian.org/Manual-Howto Ref: http://wiki.debian.org/Manual-Howto
blog/configure_awstats_on_debian_webserver.1277818962.txt.gz · Last modified: 2010-06-29 15:42 by brb