| Voir le sujet précédent :: Voir le sujet suivant |
| Auteur |
Message |
ecantin Administrateur


Inscrit le: 09 Déc 2004 Messages: 1273 Localisation: Canada, Québec, Lévis
|
Posté le: Ven Aoû 21, 2009 10:33 am Sujet du message: awstat statistique d'utilisation sous apache |
|
|
awstat
* Statistique d'utilisation d'apache.
o http://awstats.sourceforge.net/
| Code: | # mkdir awstats
# cd awstats
# wget http://voxel.dl.sourceforge.net/sourceforge/awstats/awstats-6.9.tar.gz
# su - user1
$ cp /export/home1/adm/source/awstats/awstats-6.9.tar.gz htdocs/awstats/
$ cd htdocs/awstats
$ gunzip awstats-6.9.tar.gz
$ tar xvf awstats-6.9.tar
$ rm awstats-6.9.tar
$ exit
|
* Configuration de awstats
o Adjuster les logs au format combined. (CustomLog)
| Code: | # vi /opt/coolstack/apache2/conf/httpd.conf
<IfModule log_config_module>
#
# The following directives define some format nicknames for use with
# a CustomLog directive (see below).
#
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %b" common
<IfModule logio_module>
# You need to enable mod_logio.c to use %I and %O
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
</IfModule>
#
# The location and format of the access logfile (Common Logfile Format).
# If you do not define any access logfiles within a <VirtualHost>
# container, they will be logged here. Contrariwise, if you *do*
# define per-<VirtualHost> access logfiles, transactions will be
# logged therein and *not* in this file.
#
#CustomLog logs/access_log common
#
# If you prefer a logfile with access, agent, and referer information
# (Combined Logfile Format) you can use the following directive.
#
CustomLog logs/access_log combined
</IfModule> |
* Ajouter les Alias pour le web.
| Code: | # vi /opt/coolstack/apache2/conf/extra/httpd-awstats.conf
# Cants.org/GNU
# Config fait par Eric Cantin
#
Alias /awstatsclasses "/export/home1/daemons/apache/htdocs/awstats/awstats-6.9/wwwroot/classes/"
Alias /awstatscss "/export/home1/daemons/apache/htdocs/awstats/awstats-6.9/wwwroot/css/"
Alias /awstatsicons "/export/home1/daemons/apache/htdocs/awstats/awstats-6.9/wwwroot/icon/"
ScriptAlias /awstats/ "/export/home1/daemons/apache/htdocs/awstats/awstats-6.9/wwwroot/cgi-bin/"
#
# This is to permit URL access to scripts/files in AWStats directory.
#
<Directory "/export/home1/daemons/apache/htdocs/awstats/awstats-6.9/wwwroot">
Options None
AllowOverride None
Order allow,deny
Allow from all
</Directory> |
* Inclure la configuration de awstats dans httpd.conf
| Code: | | # vi /opt/coolstack/apache2/conf/httpd.conf |
* Ajouter à la fin du fichier.
| Code: | # awstats-6.9
Include conf/extra/httpd-awstats.conf |
* Créer la configuration du site.
| Code: | # su - user1
$ cd htdocs/awstats/awstats-6.9/wwwroot/cgi-bin
$ cp awstats.model.conf awstats.www.modomaine.conf
$ chmod 755 awstats.www.mondomaine.conf |
* Modifier la configuration du site.
| Code: | | $ vi awstats.www.mondomaine.conf |
| Code: | LogFile="/var/log/httpd/mylog.log"
LogFile="/opt/coolstack/apache2/logs/access_log"
SiteDomain=""
SiteDomain="www.mondomaine"
DNSLookup=2
DNSLookup=1
DirData="."
DirData="/export/home1/daemons/apache/htdocs/awstats/logs"
DirIcons="/icon"
DirIcons="/awstatsicons" |
| Code: | $ mkdir /export/home1/daemons/apache/htdocs/awstats/logs
$ chmod -R 777 /export/home1/daemons/apache/htdocs/awstats/logs
$ exit |
* Redémarrer apache-2.2
| Code: | | # svcadm restart svc:/network/http:apache22-csk |
Premier démarrage
* Première execution
| Code: | # su - user1
$ /export/home1/daemons/apache/htdocs/awstats/awstats-6.9/wwwroot/cgi-bin/awstats.pl -config=www.mondomaine -update |
* Ajouter la tâche au cron
| Code: | # su - user1
$ crontab -e
25,55 * * * * /export/home1/daemons/apache/htdocs/awstats/awstats-6.9/wwwroot/cgi-bin/awstats.pl -config=www.mondomaine -update > /dev/null 2>&1 |
_________________
Sun Fire 3800 - 8x UltraSPARC-III+ 900 MHz - Solaris 10 U8 (à vendre)
Sun Fire v120 - 1x UtraSPARC-IIi 550MHz - Solaris 10 U8
Sun StorEdge T3+
Sun Fire V20Z - 2 x AMD Opteron 2.4 GHz - Solaris 10 U8
4 X SunRay 1(G) - SRSS v4.1
Sun Fire v100 - 1x UtraSPARC-IIi 550MHz - Solaris 10 U8
Sun Netra x1 - 1x UtraSPARC-IIe 500MHz - Solaris 10 U8
Sun Netra x1 - 1x UtraSPARC-IIe 500MHz - Solaris 10 U8
|
|
| Revenir en haut |
|
 |
Bartmoss Immortel(le) - 500


Inscrit le: 20 Aoû 2005 Messages: 589 Localisation: Trois-Rivieres, QC
|
Posté le: Dim Aoû 23, 2009 8:30 am Sujet du message: |
|
|
Merci Ecantin,
Awstats est un excellent produit pour des statistiques Web. Je l'utilise depuis 1 an ou 2 sur notre serveur Web Windows.
C'est facile a faire fonctionner et cela donne des rapports au look "professionnel". |
|
| Revenir en haut |
|
 |
ecantin Administrateur


Inscrit le: 09 Déc 2004 Messages: 1273 Localisation: Canada, Québec, Lévis
|
Posté le: Lun Aoû 24, 2009 10:45 am Sujet du message: |
|
|
ça fait depuis 4 ou 5 ans que je l'utilise.
j'utilise aussi http://www.mrunix.net/webalizer/ depuis 2001. _________________
Sun Fire 3800 - 8x UltraSPARC-III+ 900 MHz - Solaris 10 U8 (à vendre)
Sun Fire v120 - 1x UtraSPARC-IIi 550MHz - Solaris 10 U8
Sun StorEdge T3+
Sun Fire V20Z - 2 x AMD Opteron 2.4 GHz - Solaris 10 U8
4 X SunRay 1(G) - SRSS v4.1
Sun Fire v100 - 1x UtraSPARC-IIi 550MHz - Solaris 10 U8
Sun Netra x1 - 1x UtraSPARC-IIe 500MHz - Solaris 10 U8
Sun Netra x1 - 1x UtraSPARC-IIe 500MHz - Solaris 10 U8
|
|
| Revenir en haut |
|
 |
Bartmoss Immortel(le) - 500


Inscrit le: 20 Aoû 2005 Messages: 589 Localisation: Trois-Rivieres, QC
|
Posté le: Lun Aoû 24, 2009 11:40 am Sujet du message: |
|
|
Les graphiques sont tellement laid avec webalizer. C'est une des raison pour lesquelle j'ai choisi awstat.
En pensant à cela, je devrais aller voir si il y a pas une mise a jour d'Awstat avec des nouvelles fonctionnalité. |
|
| Revenir en haut |
|
 |
|