AWStats
#1
AWStats ir Apache web servera pierakstu analizators.

https://wiki.debian.org/Manual-Howto#AWStats_on_Debian

AWStats on Debian
  • Install AWStats
aptitude update
aptitude awstats
  • Configure the apache2 for awstats
  • Copy configuration file for apache2.
cp /usr/share/doc/awstats/examples/apache.conf /etc/apache2/conf.d/awstats
  • Then edit /etc/awstats/awstats.conf file and make sure the file contains (double check the apache2 word)
LogFile="/var/log/apache2/access.log"
SiteDomain="mysite.org"
LogFormat=1
  • Now change a permission on apache log file
chmod o+r /var/log/apache2/access.log
  • Make it a default that access.log has these permissions.
  • Edit the /etc/logrotate.d/apache2 and make sure it has these lines
create 644 root adm
  • And
prerotate
    /usr/lib/cgi-bin/awstats.pl -config=awstats.www.mysite.org.conf  -update
  endscript
  • Final file should look similar to :
/var/log/apache2/*.log {
        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:
/var/log/apache2/*.log {
        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
/etc/init.d/apache2 reload
  • And visit:
http://localhost/cgi-bin/awstats.pl?config=awstat.conf or mysite.com/cgi-bin/awstats.pl?config=awstat.conf [Optional]
  • 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
  • Now you can access the awstats statistics by going to
mysite.com/logs
  • Done.

Izskatās gana vienkārši, bet parasti vienalga uzķeras. Wink
"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
Atbilde
#2
Sanāca uzlikt, akmens bija skopumā:

Kods:
a2enmod cgi
service apache2 restart
"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
Atbilde
« Vecāks | Jaunāks »


Pārlēkt uz:


Users browsing this thread: 2 Guest(s)