==== AWStats ====
Poiché **AWStats** continua a dare problemi se si tenta di utilizzare il tasto di aggiornamento ho deciso di deprecare questa WebApp.
Questo software è un analizzatore dei files di log di Apache.
Genera grafici sulla fruizione delle pagine.
Per installarlo basta digitare
sudo apt-get install awstats
Se si vuole avere anche la geolocalizzazione dei visitatori installare anche
sudo apt-get install libnet-ip-perl
sudo apt-get install libgeo-ipfree-perl
Il file di configurazione di AWStats si trova in ''/etc/awstats''.
Viene fornito un template chiamato "awstats.conf".
E' necessario creare una copia di ''awstats.conf'' per ogni dominio di cui si desidera avere le statistiche:
sudo cp /etc/awstats/awstats.conf /etc/awstats/awstats.miosito.com.conf
Successivamente modificare il nuovo file
sudo nano /etc/awstats/awstats.miosito.com.conf
cercare le voci indicate di seguito e renderle come mostrato:
#Apache
LogFile="/home/<#webmaster>/www/logs/access_http_miosito_com.log"
# Name Dominio
SiteDomain="miosito.com"
HostAliases="localhost 127.0.0.1 miosito.com"
# Cartella statistiche
DirData="/home/<#webmaster>/www/stats"
# Abilitare tasto Update
AllowToUpdateStatsFromBrowser=1
# Visualizza intero anno
AllowFullYearView=3
Potete anche aggiungere le seguenti righe per attivare i plugins della geolocalizzazione
LoadPlugin="tooltips"
LoadPlugin="geoipfree"
Copiare il file di awstats nella ''cgi-bin'' del sito
sudo cp /usr/lib/cgi-bin/awstats.pl /home/<#webmaster>/www/cgi-bin/
e modificarne i privilegi
sudo chown <#webmaster>:www-data /home/<#webmaster>/www/cgi-bin/awstats.pl
sudo chmod 554 /home/<#webmaster>/www/cgi-bin/awstats.pl
Generare le prime statistiche (basate sul file ''var/log/apache2/access.log'' già esistente
/home/<#webmaster>/www/cgi-bin/awstats.pl -config=yourdomain.com -update
Dovreste ottenere un output simile a questo
Create/Update database for config "/etc/awstats/awstats.toto.com.conf" by AWStats version 6.7 (build 1.892)
From data in log file "/var/log/apache2/access.log"...
Phase 1 : First bypass old records, searching new record...
Searching new records from beginning of log file...
Phase 2 : Now process new records (Flush history on disk after 20000 hosts)...
Jumped lines in file: 0
Parsed lines in file: 191338
Found 0 dropped records,
Found 24 corrupted records,
Found 0 old records,
Found 191314 new qualified records.
Creare il file ''/etc/apache2/conf.d/statistics''
nano /etc/apache2/conf.d/statistics
e copiarvi le seguenti linee
Alias /awstatsclasses "/usr/share/awstats/lib/"
Alias /awstats-icon/ "/usr/share/awstats/icon/"
Alias /awstatscss "/usr/share/doc/awstats/examples/css"
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
ScriptAlias /statistics/ /usr/lib/cgi-bin/
Options ExecCGI -MultiViews +SymLinksIfOwnerMatch
Riavviare Apache
sudo /etc/init.d/apache2 restart
e verificare se tutto ha funzionato puntando il vostro browser su \\
http://yourdomain.ext/awstats/awstats.pl \\
o \\
http://yourdomain.ext/awstats/awstats.pl?config=yourdomain.ext \\
se avere più files di configurazione.
Per rendere la generazione delle statistiche automatica è necessario mettere la chiamata per l'aggiornamento in ''contab''
crontab -e
ed aggiungere queste righe
# update every 10 min
*/10 * * * * root /usr/lib/cgi-bin/awstats.pl -config=toto.com -update > /dev/null
^Riferimenti^
|[[http://awstats.sourceforge.net/|Sito Ufficiale 1]]|
|[[http://www.awstats.org/|Sito Ufficiale 2]]|
|[[http://awstats.sourceforge.net/docs/awstats_faq.html]]|
|[[http://awstats.sourceforge.net/docs/index.html]]|
|[[http://awstats.sourceforge.net/docs/awstats_setup.html]]|
|[[http://jeromejaglale.com/doc/ubuntu/awstats]]|
|[[http://ubuntu-tutorials.com/2008/01/16/configuring-awstats-on-ubuntu-server/]]|
|[[http://www.mneylon.com/blog/archives/2005/08/03/configuring-awstats-with-apache-2-on-ubuntu/]]|
|[[https://help.ubuntu.com/community/AWStats]]|
|[[http://kastang.com/blog/2010/07/awstats-on-ubuntu-10-04-server/]]|