le fichier est cré automatiquement à l’installation :
/etc/crond.d/awstats
Dans ce fichier, on trouve, par défaut :
On reprend nos scripts de configuration du domaine et des deux sous-domaines au niveau de l’installation.
vosinformations.com
sudo /usr/lib/cgi-bin/awstats.pl -config=vosinformations –update
ip.vosinformations.com
sudo /usr/lib/cgi-bin/awstats.pl -config=ip –update
tools.vosinformations.com
sudo /usr/lib/cgi-bin/awstats.pl -config=tools –update
et on va les adapter à la configuration :
La syntaxe :
0,10,20,30,40,50 * * * * - la tâche cron est exécutée toutes les 10 minutes.
Personnellement, j’effecturai cette tâche une seule fois par jour à 5h, avec chaque fois un intervalle de 5 minutes.
-
0 5 * * * - 5h pour vosinformations.com -
5 5 * * * - 5h05 pour ip.vosinformations.com -
10 5 * * * - 5h10 pour tools.vosinformations.com
www-data - utilisateur www-data
[ -x /usr/lib/cgi-bin/awstats.pl
-a -f /etc/awstats/awstats.conf
-a -r /var/log/apache/access.log ]
Il s’agit ici des des emplacements :
- de l’exécutable awstats.pl
- du fichier de configuration
- des logs.
On va maintenant y adapter le domaine + les sous-domaines.
vosinformations.com
ip.vosinformations.com
tools.vosinformations.com
On les regroupe au sein du même fichier /etc/crond.d/awstats pour obtenir