Contenu | Rechercher | Menus

Annonce

Si vous avez des soucis pour rester connecté, déconnectez-vous puis reconnectez-vous depuis ce lien en cochant la case
Me connecter automatiquement lors de mes prochaines visites.

À propos de l'équipe du forum.

#1 Le 17/02/2009, à 16:51

hornetovore

Impossible de configurer awstats

Bonjour,

J'ai mon serveur qui a eu un problème il y a quelque temps , je l'avais ré-installé mais awstats ne fonctionnait plus, je viens à peine de me decider à le refaire fonctionner, c'est que c'est pratique quand même, mais j'ai un problème, j'ai beau tout désinstaller avec l'option purge pour repartir de zero,
ça ne veut pas, je vous detaille l'opération:

Installation des paquets:

sudo apt-get install awstats libmldbm-perl libnet-xwhois-perl libgeo-ipfree-perl

Je créé mon fichier pour mon site:

sudo cp /etc/awstats/awstats.conf /etc/awstats/awstats.adresse_publique_de_mon_site.biz.conf

J'ai modifié ça dans mon fichier fraichement copié ci dessus:

LogType=W
LogFormat=1
LogFile="/var/log/apache2/access.log" # pour apache2
SiteDomain="adresse_publique_de_mon_site.biz"

Je teste les logs avec:

sudo /usr/lib/cgi-bin/awstats.pl -config=adresse_publique_de_mon_site.biz –update

J'ai de retour:

Create/Update database for config "/etc/awstats/awstats.adresse_publique_de_mon_site.biz.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: 1243
 Found 0 dropped records,
 Found 1 corrupted records,
 Found 0 old records,
 Found 1242 new qualified records.

Déjà un truc qui n'a pas l'air ok là...

Puis j'ajoute l'analyse des logs archivés:

cd /var/log/apache*
   for i in access.log.*.gz; do
   zcat $i | /usr/lib/cgi-bin/awstats.pl -config=adresse_publique_de_mon_site.biz -update;
   done

Qui me renvoie ça:

Error: SiteDomain parameter not defined in your config/domain file. You must edit it for using this version of AWStats.
Setup ('/etc/awstats/awstats.conf' file, web server or permissions) may be wrong.
Check config file, permissions and AWStats documentation (in 'docs' directory).
Error: SiteDomain parameter not defined in your config/domain file. You must edit it for using this version of AWStats.
Setup ('/etc/awstats/awstats.conf' file, web server or permissions) may be wrong.
Check config file, permissions and AWStats documentation (in 'docs' directory).
Create/Update database for config "/etc/awstats/awstats.adresse_publique_de_mon_site.biz.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)...
Error: Couldn't open file "/var/lib/awstats/awstats022009.adresse_publique_de_mon_site.biz.tmp.26217" for write: Permission denied
Setup ('/etc/awstats/awstats.adresse_publique_de_mon_site.biz.conf' file, web server or permissions) may be wrong.
Check config file, permissions and AWStats documentation (in 'docs' directory).
Error: SiteDomain parameter not defined in your config/domain file. You must edit it for using this version of AWStats.
Setup ('/etc/awstats/awstats.conf' file, web server or permissions) may be wrong.
Check config file, permissions and AWStats documentation (in 'docs' directory).
Error: SiteDomain parameter not defined in your config/domain file. You must edit it for using this version of AWStats.
Setup ('/etc/awstats/awstats.conf' file, web server or permissions) may be wrong.
Check config file, permissions and AWStats documentation (in 'docs' directory).
Create/Update database for config "/etc/awstats/awstats.adresse_publique_de_mon_site.biz.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)...
Error: Couldn't open file "/var/lib/awstats/awstats022009.adresse_publique_de_mon_site.biz.tmp.26223" for write: Permission denied
Setup ('/etc/awstats/awstats.adresse_publique_de_mon_site.biz.conf' file, web server or permissions) may be wrong.
Check config file, permissions and AWStats documentation (in 'docs' directory).
Error: SiteDomain parameter not defined in your config/domain file. You must edit it for using this version of AWStats.
Setup ('/etc/awstats/awstats.conf' file, web server or permissions) may be wrong.
Check config file, permissions and AWStats documentation (in 'docs' directory).
Error: SiteDomain parameter not defined in your config/domain file. You must edit it for using this version of AWStats.
Setup ('/etc/awstats/awstats.conf' file, web server or permissions) may be wrong.
Check config file, permissions and AWStats documentation (in 'docs' directory).
Create/Update database for config "/etc/awstats/awstats.adresse_publique_de_mon_site.biz.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)...
Error: Couldn't open file "/var/lib/awstats/awstats022009.adresse_publique_de_mon_site.biz.tmp.26229" for write: Permission denied
Setup ('/etc/awstats/awstats.adresse_publique_de_mon_site.biz.conf' file, web server or permissions) may be wrong.
Check config file, permissions and AWStats documentation (in 'docs' directory).
Error: SiteDomain parameter not defined in your config/domain file. You must edit it for using this version of AWStats.
Setup ('/etc/awstats/awstats.conf' file, web server or permissions) may be wrong.
Check config file, permissions and AWStats documentation (in 'docs' directory).
Error: SiteDomain parameter not defined in your config/domain file. You must edit it for using this version of AWStats.
Setup ('/etc/awstats/awstats.conf' file, web server or permissions) may be wrong.
Check config file, permissions and AWStats documentation (in 'docs' directory).
Create/Update database for config "/etc/awstats/awstats.adresse_publique_de_mon_site.biz.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)...
Error: Couldn't open file "/var/lib/awstats/awstats022009.adresse_publique_de_mon_site.biz.tmp.26235" for write: Permission denied
Setup ('/etc/awstats/awstats.adresse_publique_de_mon_site.biz.conf' file, web server or permissions) may be wrong.
Check config file, permissions and AWStats documentation (in 'docs' directory).
Error: SiteDomain parameter not defined in your config/domain file. You must edit it for using this version of AWStats.
Setup ('/etc/awstats/awstats.conf' file, web server or permissions) may be wrong.
Check config file, permissions and AWStats documentation (in 'docs' directory).
Error: SiteDomain parameter not defined in your config/domain file. You must edit it for using this version of AWStats.
Setup ('/etc/awstats/awstats.conf' file, web server or permissions) may be wrong.
Check config file, permissions and AWStats documentation (in 'docs' directory).
Create/Update database for config "/etc/awstats/awstats.adresse_publique_de_mon_site.biz.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)...
Error: Couldn't open file "/var/lib/awstats/awstats022009.adresse_publique_de_mon_site.biz.tmp.26241" for write: Permission denied
Setup ('/etc/awstats/awstats.adresse_publique_de_mon_site.biz.conf' file, web server or permissions) may be wrong.
Check config file, permissions and AWStats documentation (in 'docs' directory).
Error: SiteDomain parameter not defined in your config/domain file. You must edit it for using this version of AWStats.
Setup ('/etc/awstats/awstats.conf' file, web server or permissions) may be wrong.
Check config file, permissions and AWStats documentation (in 'docs' directory).
Error: SiteDomain parameter not defined in your config/domain file. You must edit it for using this version of AWStats.
Setup ('/etc/awstats/awstats.conf' file, web server or permissions) may be wrong.
Check config file, permissions and AWStats documentation (in 'docs' directory).
Create/Update database for config "/etc/awstats/awstats.adresse_publique_de_mon_site.biz.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)...
Error: Couldn't open file "/var/lib/awstats/awstats022009.adresse_publique_de_mon_site.biz.tmp.26247" for write: Permission denied
Setup ('/etc/awstats/awstats.adresse_publique_de_mon_site.biz.conf' file, web server or permissions) may be wrong.
Check config file, permissions and AWStats documentation (in 'docs' directory).
Error: SiteDomain parameter not defined in your config/domain file. You must edit it for using this version of AWStats.
Setup ('/etc/awstats/awstats.conf' file, web server or permissions) may be wrong.
Check config file, permissions and AWStats documentation (in 'docs' directory).
Error: SiteDomain parameter not defined in your config/domain file. You must edit it for using this version of AWStats.
Setup ('/etc/awstats/awstats.conf' file, web server or permissions) may be wrong.
Check config file, permissions and AWStats documentation (in 'docs' directory).
Create/Update database for config "/etc/awstats/awstats.adresse_publique_de_mon_site.biz.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)...
Error: Couldn't open file "/var/lib/awstats/awstats022009.adresse_publique_de_mon_site.biz.tmp.26253" for write: Permission denied
Setup ('/etc/awstats/awstats.adresse_publique_de_mon_site.biz.conf' file, web server or permissions) may be wrong.
Check config file, permissions and AWStats documentation (in 'docs' directory).

J'en déduis que mon fichiers de configuration est mal rempli, mais j'ai pourtant fais comme demandé...
pas le awstats.conf mais le awstats.adresse_publique_de_mon_site.biz.conf

Voilà où j'en suis...
Je m'en remet à vous ^^.

Merci d'avance

P.S: j'ai remplacé le site n'étant pas encore fini mon adresse par adresse_publique_de_mon_site.biz, c'est une adresse semblable à adresse.serveurdns.biz

EDIT: Pour la suite, j'ai déjà fait le fichier /etc/apache2/site-available/awstats rempli avec:

Alias /awstatsclasses "/usr/share/awstats/classes/"
Alias /awstatscss "/usr/share/awstats/css/"
Alias /awstats-icon "/usr/share/awstats/icon/"

ScriptAlias /stats /usr/lib/cgi-bin/awstats.pl

# mêmes paramètres que dans awstats.*.conf
<Directory /usr/lib/cgi-bin/>
  DirectoryIndex awstats.pl
  UseCanonicalName off
#  AuthName "Statistiques awstats"
#  AuthType Basic
#  Require valid-user
#  AuthUserFile /che/min/.passwdstats
  Options +ExecCGI
  AllowOverride None
  Order allow,deny
  Allow from all
</Directory>

,

aussi fait le lien symbolique, ça me retourne ça si je reessaye:

a2ensite awstats
This site is already enabled!

La page s'affiche correctement mais il n'y a pas de données qui se mette à jour, rien...

Dernière modification par hornetovore (Le 21/02/2009, à 10:12)

Hors ligne

#2 Le 20/02/2009, à 00:13

hornetovore

Re : Impossible de configurer awstats

Un p'ti up,

Je n'arrive à rien tout seul, j'en suis à l'étape où je dois à chaque fois faire manuellement:

sudo /usr/lib/cgi-bin/awstats.pl -config=adresse_publique_de_mon_site.biz –update

pour mettre à jour , c'est donc déjà mieux mais pas encore ça...

Help hmm

Dernière modification par hornetovore (Le 20/02/2009, à 00:14)

Hors ligne

#3 Le 20/02/2009, à 13:22

alex206

Re : Impossible de configurer awstats

pour automatiser la génération des statistiques, il te faut utiliser cron. Un exemple que j'utilise :

32 * * * * www-data /usr/lib/cgi-bin/awstats.pl -config=awstats --update > /dev/null

je mets cette ligne dans le fichier /etc/cron.d/awstats. Pour la fréquence de mise à jour, ici c'est fait une fois par heure, à la minute 32, mais tu peux très bien modifier pour augmenter ou diminuer.


Debian stable ya que ça de vrai
http://astuces.alexcms.org

Hors ligne

#4 Le 21/02/2009, à 09:11

hornetovore

Re : Impossible de configurer awstats

Salut, merci de ton aide,

J'ai été voir et j'ai apparement déjà un fichier awstats dans cron, j'ai à peu près la même chose dedans, j'ai ça:

jo@serveur:~$ vim /etc/cron.d/awstats
0,10,20,30,40,50 * * * * www-data [ -x /usr/lib/cgi-bin/awstats.pl -a -f /etc/awstats/awstats.conf -a -r /var/log/apache/access.log ] && /usr/lib/cgi-bin/awstats.pl -config=awstats -update >/dev/null
~

J'ai à nouveau tout supprimé avec purge puis réinstallé en faisant ce coup ci avec un fichier où mon adresse est celle en local, il n'y a toujours pas de mise à jour, le fichier s'est affiché avec les stats sitôt la config finie puis ce matin, plus rien, vide, même plus ce qu'il m'affichait hier!

Et la ligne tout en haut qui informe de la date de la dernière mise à jour me dis ça:
Dernière mise à jour:     Jamais mis à jour (Voir 'Build/Update', page awstats_setup.html)

Hors ligne

#5 Le 23/02/2009, à 21:57

hornetovore

Re : Impossible de configurer awstats

Un pti up,
J'en suis rendu a devoir faire en ligne de commande:

for i in access.log.*.gz; do zcat $i | /usr/lib/cgi-bin/awstats.pl -config=192.168.1.20 -update; done

Je ne vais quand même pas devoir mettre ça en tache pour cron, il doit bien y avoir un problème quelque pars qui se regle...

Helllp amis linuxien hmm

Hors ligne

#6 Le 24/02/2009, à 14:36

hornetovore

Re : Impossible de configurer awstats

Personne n'a d'idée sur ce que pourrait être mon problème alors?

Hors ligne

#7 Le 25/02/2009, à 14:09

hornetovore

Re : Impossible de configurer awstats

Un dernier 'ti up puis j'abandonne ... sad

Hors ligne

#8 Le 25/02/2009, à 23:11

alex206

Re : Impossible de configurer awstats

bon reprenons, tu en es ou maintenant ? arrives tu à généré des stats des logs archivés ? le cron, as tu rentré ce que je t'ai co,seillé plus haut ? si non, qu'y a t'il dans ta conf de cron pour awstats ?


Debian stable ya que ça de vrai
http://astuces.alexcms.org

Hors ligne

#9 Le 25/02/2009, à 23:31

hornetovore

Re : Impossible de configurer awstats

alex206 a écrit :

bon reprenons, tu en es ou maintenant ? arrives tu à généré des stats des logs archivés ? le cron, as tu rentré ce que je t'ai co,seillé plus haut ? si non, qu'y a t'il dans ta conf de cron pour awstats ?

J'en suis au point où ça ne fonctionne pas tout seul, je peux avoir une analyse de mes logs en faisant cette commande:

for i in access.log.*.gz; do zcat $i | /usr/lib/cgi-bin/awstats.pl -config=192.168.1.20 -update; done

Sans ça, aucune mise à jour, et dans mon fichier awstats pour cron, j'ai:

jo@serveur:~$ vim /etc/cron.d/awstats
0,10,20,30,40,50 * * * * www-data [ -x /usr/lib/cgi-bin/awstats.pl -a -f /etc/awstats/awstats.conf -a -r /var/log/apache/access.log ] && /usr/lib/cgi-bin/awstats.pl -config=awstats -update >/dev/null
~

Mais si je teste une mise à jour manuelle avec la ligne:

/usr/lib/cgi-bin/awstats.pl -config=awstats -update

Ca ne me fais rien, pas de stats.

Hors ligne