User Tools

Site Tools


sermn_wiki:userpages:marta:awstats

This is an old revision of the document!


Estadístiques del servidor amb AWStats

Després de comparar diferents Web Statistics Tools, al final ens hem decidit pel programa awstats per consultar l'ús del difrents servidors virtuals del SeRMN.

Enllaços d'interès

Configuració de l'awstats

Configuració general

Amb la comanda perl awstats_configure.pl es realitza una configuració generica del programa. On per exemple s'especifica quuin és el fitxer de configuració de l'Apache: /etc/<apache_folder>/<file>.conf <note important> A la pregunta:
Do you want me to build a new AWStats config/profile file (required if first install) [y/N] ?
S'ha de contestar N</note>

Un cop completada la instalació configurem l'arxiu awstats.conf.

# AWSTATS CONFIGURE FILE 
   LogFile = "/var/log/<carpeta>/access.log"   # contains the web log file to analyze.
   LogType = W                                 # W - For a web log file
   LogFormat = 1                               # 1 - Apache or Lotus Notes/Domino native combined log format 
                                               #     (NCSA combined/XLF/ELF log format)
   
   SiteDomain="cie-58-175.uab.cat"             # contain the main domain name or the main intranet web server name.
   
   HostAliases="localhost 127.0.0.1 cie-58-175.uab.es"
                                               # all other possible domain names, addresses or virtual host aliases 
   
   DirData = "<path>"                          # AWStats stores results of its analysis in files in this directory
   DirCgi = "/cgi-bin"                         # Relative or absolute web URL of your awstats cgi-bin directory.
   DirIcons = "/awstats-icon"                  # Relative or absolute web URL of your awstats icon directory.

Virtual hosts

<note warning> En construcción </note>

Per diferenciar entre diferents virtual hosts a una mateixa máquina, l'AWStats proposa dues solucions:

  • 1. Un únic fitxer log per tots del virtual hosts del servidor. Aleshores, l'AWStats utilitza el parametre SiteDomain per filtrar el contingut del fitxer .log nomeś per el virtual host especificat. Ens hem d'asegurar que el hostname virtual es trobi al fitxer .log y utilitzar un format personalitzat que inclogui l'etiqueta %virtualname.
  • 2. Un fitxer log per cadascun dels virtual hosts del servidor. Aleshores, l'AWStats conté un fitxer de configuració per cada virtual host.

En aquests cas s'ha optat per la segona, ja que tenim més control sobre el seu funcionament.

#—————————————————————————–

# Copy this file into awstats.mydomain.com.conf and edit this new config file to setup AWStats (See documentation in docs/ directory). The config file must be in /etc/awstats, /usr/local/etc/awstats or /etc (for Unix/Linux)

This website uses cookies. By using the website, you agree with storing cookies on your computer. Also you acknowledge that you have read and understand our Privacy Policy. If you do not agree leave the website.More information about cookies
sermn_wiki/userpages/marta/awstats.1226663006.txt.gz · Last modified: 2008/11/14 12:43 by marta