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
Last revisionBoth sides next revision
blog:configure_awstats_on_debian_webserver [2010-06-29 15:42] brbblog:configure_awstats_on_debian_webserver [2010-10-24 10:28] 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 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 58: Line 63:
  
 To make it easier to remember the address you can edit /etc/apache2/conf.d/awstats and add this line.  To make it easier to remember the address you can edit /etc/apache2/conf.d/awstats and add this line. 
-  RedirectMatch ^/logs /cgi-bin/awstats.pl?config=awstat.conf+  RedirectMatch ^/logs /cgi-bin/awstats.pl
  
 Now you can access the awstats statistics by going to  Now you can access the awstats statistics by going to 
   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.txt · Last modified: 2010-10-24 10:29 by brb