AWStats ir Apache web servera pierakstu analizators.
https://wiki.debian.org/Manual-Howto#AWStats_on_Debian
AWStats on Debian
aptitude awstats
SiteDomain="mysite.org"
LogFormat=1
/usr/lib/cgi-bin/awstats.pl -config=awstats.www.mysite.org.conf -update
endscript
weekly
missingok
rotate 52
compress
delaycompress
notifempty
create 644 root adm
sharedscripts
prerotate
/usr/lib/cgi-bin/awstats.pl -config=awstats.conf -update endscript
postrotate
if [ -f /var/run/apache2.pid ]; then
/etc/init.d/apache2 restart > /dev/null
fi
endscript
}
weekly
missingok
rotate 52
compress
delaycompress
notifempty
create 640 root adm
sharedscripts
postrotate
/usr/lib/cgi-bin/awstats.pl -config=awstats.www.first.site.com.conf -update
/usr/lib/cgi-bin/awstats.pl -config=awstats.www.second.site.conf -update
/usr/lib/cgi-bin/awstats.pl -config=awstats.www.third.site.conf -update
/etc/init.d/apache2 reload > /dev/null
endscript
}
Izskatās gana vienkārši, bet parasti vienalga uzķeras.
https://wiki.debian.org/Manual-Howto#AWStats_on_Debian
AWStats on Debian
- Install AWStats
aptitude awstats
- Configure the apache2 for awstats
- Copy configuration file for apache2.
- Then edit /etc/awstats/awstats.conf file and make sure the file contains (double check the apache2 word)
SiteDomain="mysite.org"
LogFormat=1
- Now change a permission on apache log file
- Make it a default that access.log has these permissions.
- Edit the /etc/logrotate.d/apache2 and make sure it has these lines
- And
/usr/lib/cgi-bin/awstats.pl -config=awstats.www.mysite.org.conf -update
endscript
- Final file should look similar to :
weekly
missingok
rotate 52
compress
delaycompress
notifempty
create 644 root adm
sharedscripts
prerotate
/usr/lib/cgi-bin/awstats.pl -config=awstats.conf -update endscript
postrotate
if [ -f /var/run/apache2.pid ]; then
/etc/init.d/apache2 restart > /dev/null
fi
endscript
}
- and if you have more than one site, it looks like:
weekly
missingok
rotate 52
compress
delaycompress
notifempty
create 640 root adm
sharedscripts
postrotate
/usr/lib/cgi-bin/awstats.pl -config=awstats.www.first.site.com.conf -update
/usr/lib/cgi-bin/awstats.pl -config=awstats.www.second.site.conf -update
/usr/lib/cgi-bin/awstats.pl -config=awstats.www.third.site.conf -update
/etc/init.d/apache2 reload > /dev/null
endscript
}
- Reload apache
- And visit:
- To make it easier to remember the address you can edit /etc/apache2/conf.d/awstats and add this line.
- Now you can access the awstats statistics by going to
- Done.
Izskatās gana vienkārši, bet parasti vienalga uzķeras.
"Kā cilvēks, kam trūkst pašcieņas, nav dīdzējs, bet nīcējs, tā arī tauta, kurai nav pašapziņas." K.Mīlenbahs