

Autour de LDAP
Awstats
Backup HP COLORADO 5G
Compatibilit� Linux
Configuration NFS
Configuration ZSH
Configuration de FreeBSD
Connexion ADSL PPPOE
IPFILTER
Installation PXE
Installation d'un DNS
Installation d'un Squirrelmail
Installation de Apache SSL
Installation de FreeBSD
Installation de GRUB
Installation de MailScanner
Installation de PostgreSQL
Jail sous FreeBSD
Mise a jour de votre FreeBSD
Serveur CVS
Serveur DHCPd
Serveur IRCd
Serveur NTPd
Serveur ProFTPd
Serveur at home
Utilisation simple de CVS
X11: interface graphique




Et aussi ...
rockanjou.org
|
Awstats, une vision de l'utilisation de votre serveur
sommaire
1- Introduction
2- Configuration
3- Mise a jour
4- Admirez votre sortie Awstats
1- Introduction
Awstats est un outil qui va vous permettre de voir le nombre de connection sur votre site internet. Vous pouvez aller voir une demo ici:
Awstats demo
2- Configuration
vous devez recopier la config model pour chacun de vos site
$ cp /usr/local/etc/awstats/awstats.model.conf /usr/local/etc/awstats.diablotins.org.conf
puis modifier la conf avec un editeur de votre choix (vi, ee, emacs, ...)
les lignes a modifier sont:
- LogFile : vous devez mettre le fichier de log d'apache
par exemple: LogFile="/var/log/httpd-access.log"
- SiteDomain: le domaine a surveiller
par exemple: SiteDomain="www.diablotins.org"
- DirData: un repertoire ou awstats pourra ecrire ses infos
par exemple: DirData="/var/cache/awstats"
3- Mise a jour
Un petit script pour automatiser le tout (load_awstats)
#!/usr/local/bin/ruby
# SCRIPT : Maj de Awstats
# AUTEUR : Romain GEORGES
# VERSION : 1.0
# DATE : 3/10/2003
# $id$
# variable et initialisation
arguments_list = Hash::new
arguments_string = String::new("")
log_file="/dev/null"
periode="now"
commande="/usr/local/bin/awstats_updateall.pl"
path_to_awstats="/usr/local/www/cgi-bin/awstats.pl"
config_dir="/usr/local/etc/awstats"
arguments_list["awstatsprog"]=path_to_awstats
arguments_list["configdir"]=config_dir
# generation de la liste d'argument
arguments_list.each{|key,value|
arguments_string.concat("-#{key}=#{value} ")
}
# processus de generation des stats via Awstats
system("#{commande} #{periode} #{arguments_string} >> log_file} 2>#{log_file}")
La mise a jour des stats se fait a interval que vous le desirez. La maniere la plus simple est de rajouter une ligne dans votre cron.
*/15 * * * * /scripts/load_awstats
4- Admirez votre sortie Awstats
aller dans votre navigateur:
http://monserveur/cgi-bin/awstats.pl
Et voila
Sebastien FARRAN le 2004/10/08 |
|