sudo apt-get install awstats
Copy this in “/etc/logrotate.d/awstats
/var/log/apache2/*_log { weekly missingok rotate 52 compress delaycompress notifempty create 644 root root sharedscripts prerotate /usr/local/awstats/tools/awstats_updateall.pl now > /dev/null endscript postrotate /etc/init.d/apache2 reload > /dev/null endscript }
The list of refs and OS info is empty because of a wrong perl version. Error occurs with perl above 5.10.0.
Check your version with:
perl -v
Perl changed some things which mess up the awstats perl file
Open your awstats.pl
vi /usr/local/awstats/wwwroot/cgi-bin/awstats.plLine 1354, comment
if (/\(\?[-\w]*:(.*)\)/) { $1 }insert “UnCompileRegex($_)”
OptimizeArray { my $array = shift; my @arrayunreg = map { UnCompileRegex($_) } @$array; my $notcasesensitive = shift;
Line 7812, comment
shift =~ /(\?[-\w]:(.))/;insert “shift =~ /(\?[-^\w]:(.))/;”
UnCompileRegex { shift =~ /(\?[-^\w]:(.))/; return $1; }
Discussion