monthly summarydatafile.
^DirData
' /etc/awstats/awstats.virtualhost.myDomain.tld.confDirData="/var/lib/awstats"
logfile.1 [09/Oct/2019:02:17:21 +0200] [09/Oct/2019:18:42:11 +0200] logfile.2 [08/Oct/2019:02:16:25 +0200] [09/Oct/2019:02:15:08 +0200] logfile.3 [07/Oct/2019:22:41:23 +0200] [08/Oct/2019:02:15:46 +0200]
Sorry, configure.pl does not support automatic add to cron yet.
You can do it manually by adding the following command to your cron:
/var/www/awstats/wwwroot/cgi-bin/awstats.pl -update -config=www.example.com
Or if you have several config files and prefer having only one command:
/var/www/awstats/tools/awstats_updateall.pl now
You can then manually update your statistics for 'www.example.com' with command: > perl awstats.pl -update -config=www.example.com You can also read your statistics for 'www.example.com' with URL: > http://localhost/awstats/awstats.pl?config=www.example.comyou can now build the database :
server.modules = ( , "mod_cgi", )
$HTTP["host"] =~ "^awstats" + domainNameRegExp { server.document-root = "/var/www/awstats/wwwroot" accesslog.filename = logRoot + "awstats.access.log" cgi.assign = ( ".pl" => "/usr/bin/perl", ".cgi" => "/usr/bin/perl" ) alias.url = ( "/awstatsclasses" => "/var/www/awstats/wwwroot/classes/" ) alias.url += ( "/awstatscss" => "/var/www/awstats/wwwroot/css/" ) alias.url += ( "/awstatsicons" => "/var/www/awstats/wwwroot/icon/" ) }
$HTTP["host"] =~ "^awstats" + domainNameRegExp {
setenv.add-response-header = ( "Cache-Control" => "no-cache" )
}
User-agent: * Disallow: /
*/15 * * * * perl /var/www/awstats/wwwroot/cgi-bin/awstats.pl -update -config=www.example.com
cat << EOF > /etc/logrotate.d/www.example.com /var/log/varnish/www.example.com.log { missingok notifempty daily rotate 30 compress sharedscripts prerotate /var/www/awstats/wwwroot/cgi-bin/awstats.pl -update -config=www.example.com endscript create postrotate kill -HUP \$(cat /run/varnishncsa/varnishncsa_www.example.com.pid) endscript } EOF