Forum OVH  

Précédent   Forum OVH > Serveurs dédiés > HOW-TO
S'inscrire FAQ Guides Recherche Messages du jour Marquer les forums comme lus

Réponse
 
Outils de la discussion
Vieux 11/02/2004, 03h02   #1
Elgi
Membre
 
Date d'inscription: février 2004
Messages: 2 083
Envoyer un message via MSN à Elgi
Awstats

Voici un howto basique et à adapté pour installer awstats sur vos serveurs :

Code:
 cd /home/ovh/src/soft
 wget http://switch.dl.sourceforge.net/sourceforge/awstats/awstats-6.0.tgz
 cd ..
 tar xvfz soft/awstats-6.0.tgz
 cd awstats-6.0
 
 cp -rf wwwroot/cgi-bin/* /home/ovh/cgi-bin
 cp -rf wwwroot/classes /home/ovh/www/
 cp -rf wwwroot/css /home/ovh/www/
 cp -rf wwwroot/icon/* /usr/local/apache/icons/
 cp -rf wwwroot/js /home/ovh/www/
 cp -rf tools/*.pl /home/ovh/cgi-bin/
 
 mkdir /etc/awstats/
 cp -f wwwroot/cgi-bin/awstats.model.conf /etc/awstats/
 
 chown -R ovh.ovh /home/ovh/cgi-bin
 chmod 755 /home/ovh/cgi-bin/*.pl
 
 echo "" >> /etc/crontab
 echo "# AWSTATS" >> /etc/crontab
 echo "5 1 * * * root sudo -u ovh /home/ovh/cgi-bin/awstats_updateall.pl now -awstatsprog=/home/ovh/cgi-bin/awstats.pl -configdir=/etc/awstats/" >> /etc/crontab
 echo "" >> /etc/crontab
La commande chown ainsi que le user de la commande sudo sont à adapté selon votre configuration !
Beaucoup de gens appliquant ce howto me disent "j'ai une erreur 500", normal vous recopier bétement
Pour vos soucis de droits, ce howto n'est pas fait pour ca et implique un minimum de connaissance dans l'administration d'un serveur !

A priori sur un serveur ovh qui n'a pas été modifié, il faudrais faire :
chown -R vpopmail.vchkpw /home/ovh/cgi-bin
et modifier la tache cron :
5 1 * * * root sudo -u vpopmail /home/ovh/cgi-bin/awstats_updateall.pl now -awstatsprog=/home/ovh/cgi-bin/awstats.pl -configdir=/etc/awstats/

A vous de définir les horaires du crontab et les questions liés à cela n'ont rien à voir avec ce howto

Pour chaque domaine, vous devez créer un fichier /etc/awstats/awstats.sd.domain.tld.conf :

cp /etc/awstats/awstats.model.conf /etc/awstats.sd.domain.tld.conf


Voici un exemple du fichier, j'ai bien dit exemple, /etc/awstats/awstats.model.conf et celui-ci étant un exmple pour vous donner une aide, il est préférable de lire la doc de awstats à ce sujet pour comprendre et adapté à vos serveurs et vos besoins

Code:
 LogFile="/var/log/httpd/sd.domain.tld-access_log"
 LogType=W
 LogFormat=1
 LogSeparator=" "
 SiteDomain="sd.domain.tld"
 HostAliases="localhost 127.0.0.1 REGEX[sd\.domain\.tld$]" 
 DNSLookup=1
 DirData="/var/lib/awstats"
 DirCgi="/cgi-bin"
 DirIcons="/icons"
 AllowToUpdateStatsFromBrowser=1
 AllowFullYearView=3
 EnableLockForUpdate=1
 DNSStaticCacheFile="dnscache.txt"
 DNSLastUpdateCacheFile="dnscachelastupdate.txt"
 SkipDNSLookupFor=""
 AllowAccessFromWebToAuthenticatedUsersOnly=1
 AllowAccessFromWebToFollowingAuthenticatedUsers="login moi"
 AllowAccessFromWebToFollowingIPAddresses=""
 CreateDirDataIfNotExists=0
 BuildHistoryFormat=text
 BuildReportFormat=html
 SaveDatabaseFilesWithPermissionsForEveryone=1
 PurgeLogFile=0
 ArchiveLogRecords=0
 KeepBackupOfHistoricFiles=0
 DefaultFile="index.html"
 SkipHosts="127.0.0.1 localhost"
 SkipUserAgents=""
 SkipFiles="REGEX[^\\/ovh] REGEX[^\\/stats]"
 OnlyHosts=""
 OnlyUserAgents=""
 OnlyFiles=""
 NotPageList="css js class gif jpg jpeg png bmp ico"
 ValidHTTPCodes="200 304"
 ValidSMTPCodes="1 250"
 AuthenticatedUsersNotCaseSensitive=0
 URLNotCaseSensitive=0
 URLWithAnchor=0
 URLQuerySeparators="?;"
 URLWithQuery=1
 URLWithQueryWithOnlyFollowingParameters=""
 URLWithQueryWithoutFollowingParameters="PHPSESSID"
 URLReferrerWithQuery=1
 WarningMessages=0
 ErrorMessages=""
 DebugMessages=1
 NbOfLinesForCorruptedLog=50
 WrapperScript=""
 DecodeUA=0
 MiscTrackerUrl="/js/awstats_misc_tracker.js"
 
 LevelForBrowsersDetection=2
 LevelForOSDetection=2
 LevelForRefererAnalyze=2
 LevelForRobotsDetection=2
 LevelForSearchEnginesDetection=2
 LevelForKeywordsDetection=2
 LevelForFileTypesDetection=2
 LevelForWormsDetection=0
 
 UseFramesWhenCGI=0
 DetailedReportsOnNewWindows=0
 Expires=3600
 MaxRowsInHTMLOutput=740
 Lang="fr"
 DirLang="./lang"
 
 ShowMenu=1
 ShowMonthStats=UVPHB
 ShowDaysOfMonthStats=VPHB
 ShowDaysOfWeekStats=PHB
 ShowHoursStats=PHB
 ShowDomainsStats=PHB
 ShowHostsStats=PHBL
 ShowAuthenticatedUsers=0
 ShowRobotsStats=HBL
 ShowWormsStats=0
 ShowEMailSenders=0
 ShowEMailReceivers=0
 ShowSessionsStats=1
 ShowPagesStats=PBEX
 ShowFileTypesStats=HB
 ShowFileSizesStats=0
 ShowOSStats=1
 ShowBrowsersStats=1
 ShowScreenSizeStats=0
 ShowOriginStats=PH
 ShowKeyphrasesStats=1
 ShowKeywordsStats=1
 ShowMiscStats=a
 ShowHTTPErrorsStats=1
 ShowSMTPErrorsStats=0
 ShowClusterStats=0
 
 AddDataArrayMonthStats=1
 AddDataArrayShowDaysOfMonthStats=1
 AddDataArrayShowDaysOfWeekStats=1
 AddDataArrayShowHoursStats=1
 
 MaxNbOfDomain = 10
 MinHitDomain = 1
 MaxNbOfHostsShown = 10
 MinHitHost = 1
 MaxNbOfLoginShown = 10
 MinHitLogin = 1
 MaxNbOfRobotShown = 10
 MinHitRobot = 1
 MaxNbOfPageShown = 10
 MinHitFile = 1
 MaxNbOfOsShown = 10
 MinHitOs = 1
 MaxNbOfBrowsersShown = 10
 MinHitBrowser = 1
 MaxNbOfScreenSizesShown = 5
 MinHitScreenSize = 1
 MaxNbOfRefererShown = 10
 MinHitRefer = 1
 MaxNbOfKeyphrasesShown = 10
 MinHitKeyphrase = 1
 MaxNbOfKeywordsShown = 10
 MinHitKeyword = 1
 MaxNbOfEMailsShown = 20
 MinHitEMail = 1
 
 FirstDayOfWeek=1
 ShowFlagLinks="en es fr nl es"
 ShowLinksOnUrl=1
 UseHTTPSLinkForUrl=""
 MaxLengthOfShownURL=64
 HTMLHeadSection=""
 HTMLEndSection=""
 Logo="awstats_logo6.png"
 LogoLink="http://awstats.sourceforge.net"
 BarWidth = 260
 BarHeight = 90
 StyleSheet=""
 
 color_Background="FFFFFF"
 color_TableBGTitle="CCCCDD"
 color_TableTitle="000000"
 color_TableBG="CCCCDD"
 color_TableRowTitle="FFFFFF"
 color_TableBGRowTitle="ECECEC"
 color_TableBorder="ECECEC"
 color_text="000000"
 color_textpercent="606060"
 color_titletext="000000"
 color_weekend="EAEAEA"
 color_link="0011BB"
 color_hover="605040"
 color_u="FFAA66"
 color_v="F4F090"
 color_p="4477DD"
 color_h="66DDEE"
 color_k="2EA495"
 color_s="8888DD"
 color_e="CEC2E8"
 color_x="C1B2E2"
Je vous conseille fortement de faire :

cat /etc/awstats/awstats.model.conf | mail -s "awstats" votreemail@domain.tld

afin d'éditer tranquillement en local ce fichier et le personnaliser à votre convenance.
Attention aux format DOS != UNIX avec vos éditeurs !

Pour accéder à vos stats :
http://ns.server.tld/cgi-bin/awstats.pl pour les stats de ns.server.tld

http://ns.server.tld/cgi-bin/awstats...=sd.domain.tld pour les stats d'un domaine particuliler
sd.domain.tld doit correspondre avec le fichier awstats.sd.domain.tld.conf

Venant de m'être à jour le mien, voici les namipulation à faire.
Si vous avez un soucis quelquonque, je ne suis en aucun cas responsable et ne suis pas tenue de vous aider non plus, de faire un support ou je ne sais quoi !

Toutefois, vous avez ce forum et pour ceux qui ont un dédié chez ovh la ml sd@ où vous pouvez poser vos questions.
__________________
Guides et tutoriels libres, ouvert à tous, apportez vous aussi votre contribution : http://wiki.sos-admin.com
Cordialement, Elgi http://www.elginux.com

Dernière modification par Elgi 21/03/2007 à 01h05
Elgi est déconnecté   Réponse avec citation
Vieux 11/02/2004, 09h21   #2
OVH
support
 
Date d'inscription: février 2004
Messages: 420
Ce How-To a été ajouté dans les guides d'ovh:
http://guides.ovh.com/StatistiquesDesSites/
__________________
http://www.ovh.com - le meilleur de technologie accessible à tous
vous êtes perdus ? http://guide.ovh.com vous guide
OVH est déconnecté   Réponse avec citation
Vieux 11/02/2004, 11h19   #3
chaKal
Membre
 
Date d'inscription: février 2004
Messages: 56
AWStats et logs emails

Bonjour,

Nous avons installé AWStats 6.0 (et le module webmin) sur notre dédié et ça marche magnifiquement pour les statistiques web mais AWStats permet d'analyser également les logs FTP et emails.


Voici ce que dit la FAQ de AWStats au sujet des statistiques mails:
Citation:
For standard Postfix, Sendmail, MDaemon and standard QMail logfiles, set
LogFile="perl /path/to/maillogconvert.pl standard < /pathtomaillog/maillog |"
If the logfiles are compressed, they can be processed this way
LogFile="gzip -cd /var/log/maillog.0.gz | /path/to/maillogconvert.pl standard |"
And for VAdmin QMail logfiles (multi-host/virtualhost mail servers running vadmin software), set
LogFile="perl /path/to/maillogconvert.pl vadmin < /pathtomaillog/maillog |"
J'ai testé les 2 options (standard et vadmin) mais je n'obtiens rien... La mise à jour se passe sans incident mais aucun fichier n'est créé (il ne trouve pas d'info valide dans les logs)

Comment connaitre le format utilisé par qmail ?
Je ne sais meme à quoi il doit ressembler...

J'ai bien un fichier /var/log/maillog qui a des données du type:
Citation:
Jan 18 16:47:42 toto imapd: Connection, ip=[::ffff:123.123.123.123]
Jan 18 16:47:42 toto imapd: LOGIN, user=contact@domaine.com,
ip=[::ffff:123.123.123.123]
Jan 18 16:47:44 toto imapd: LOGOUT, user=contact@domaine.com,
ip=[::ffff:123.123.123.123], headers=0, body=0
Mais il existe aussi un répertoire /var/log/qmail/ qui contient plusieurs fichiers (dont l'un s'appelle current) et qui ont des données du type:
Citation:
4000000040178e710b93b4fc new msg 225264
@4000000040178e710b93c0b4 info msg 225264: bytes 35761 from
<sender@tralala.com> qp 11129 uid 503
@4000000040178e710bc0627c starting delivery 7136: msg 225264 to local
domaine.com-contact@domaine.com
@4000000040178e710bc0721c status: local 1/10 remote 0/20
@4000000040178e7115d59f5c delivery 7136: success: did_0+0+1/
@4000000040178e7115d5bab4 status: local 0/10 remote 0/20
@4000000040178e7115d5be9c end msg 225264
si quelqu'un a une idée je suis preneur,

chaKal
chaKal est déconnecté   Réponse avec citation
Vieux 11/02/2004, 15h28   #4
karma
Membre
 
Date d'inscription: février 2004
Messages: 120
Voilà mon fichier de configuration pour un serveur Superplan + pour l'hôte karma.fr

-----------------------------------------------------------

LogFile="/var/log/httpd/sd.karma.fr-access.log"
LogType="W"
LogFormat="1"
LogSeparator=" "
SiteDomain="karma.fr"
HostAliases="www.karma.fr"
DNSLookup="1"
DirData="/var/lib/awstats"
DirCgi="/cgi-bin"
DirIcons="/icons"
AllowToUpdateStatsFromBrowser="1"
AllowFullYearView="3"
EnableLockForUpdate=1
DNSStaticCacheFile="dnscache.txt"
DNSLastUpdateCacheFile="dnscachelastupdate.txt"
SkipDNSLookupFor=""
AllowAccessFromWebToAuthenticatedUsersOnly=1
AllowAccessFromWebToFollowingAuthenticatedUsers="k arma"
AllowAccessFromWebToFollowingIPAddresses=""
CreateDirDataIfNotExists=0
BuildHistoryFormat=text
BuildReportFormat=html
SaveDatabaseFilesWithPermissionsForEveryone=1
PurgeLogFile=0
ArchiveLogRecords=0
KeepBackupOfHistoricFiles=0
DefaultFile="index.html"
SkipHosts="127.0.0.1 localhost"
SkipUserAgents=""
SkipFiles="REGEX[^\\/ovh] REGEX[^\\/stats]"
onlyHosts=""
onlyUserAgents=""
onlyFiles=""
NotPageList="css js class gif jpg jpeg png bmp ico"
ValidHTTPCodes="200 304"
ValidSMTPCodes="1 250"
AuthenticatedUsersNotCaseSensitive=0
URLNotCaseSensitive=0
URLWithAnchor=0
URLQuerySeparators="?;"
URLWithQuery=1
URLWithQueryWithOnlyFollowingParameters=""
URLWithQueryWithoutFollowingParameters="PHPSESSID"
URLReferrerWithQuery=1
WarningMessages=0
ErrorMessages=""
DebugMessages=1
NbOfLinesForCorruptedLog=50
WrapperScript=""
DecodeUA=0
MiscTrackerUrl="/js/awstats_misc_tracker.js"

LevelForBrowsersDetection=2
LevelForOSDetection=2
LevelForRefererAnalyze=2
LevelForRobotsDetection=2
LevelForSearchEnginesDetection=2
LevelForKeywordsDetection=2
LevelForFileTypesDetection=2
LevelForWormsDetection=0

UseFramesWhenCGI=0
DetailedReportsOnNewWindows=0
Expires=3600
MaxRowsInHTMLOutput=740
Lang="fr"
DirLang="./lang"

ShowMenu=1
ShowMonthStats=UVPHB
ShowDaysOfMonthStats=VPHB
ShowDaysOfWeekStats=PHB
ShowHoursStats=PHB
ShowDomainsStats=PHB
ShowHostsStats=PHBL
ShowAuthenticatedUsers=0
ShowRobotsStats=HBL
ShowWormsStats=0
ShowEMailSenders=0
ShowEMailReceivers=0
ShowSessionsStats=1
ShowPagesStats=PBEX
ShowFileTypesStats=HB
ShowFileSizesStats=0
ShowOSStats=1
ShowBrowsersStats=1
ShowScreenSizeStats=0
ShowOriginStats=PH
ShowKeyphrasesStats=1
ShowKeywordsStats=1
ShowMiscStats=a
ShowHTTPErrorsStats=1
ShowSMTPErrorsStats=0
ShowClusterStats=0

AddDataArrayMonthStats=1
AddDataArrayShowDaysOfMonthStats=1
AddDataArrayShowDaysOfWeekStats=1
AddDataArrayShowHoursStats=1

MaxNbOfDomain = 10
MinHitDomain = 1
MaxNbOfHostsShown = 10
MinHitHost = 1
MaxNbOfLoginShown = 10
MinHitLogin = 1
MaxNbOfRobotShown = 10
MinHitRobot = 1
MaxNbOfPageShown = 10
MinHitFile = 1
MaxNbOfOsShown = 10
MinHitOs = 1
MaxNbOfBrowsersShown = 10
MinHitBrowser = 1
MaxNbOfScreenSizesShown = 5
MinHitScreenSize = 1
MaxNbOfRefererShown = 10
MinHitRefer = 1
MaxNbOfKeyphrasesShown = 10
MinHitKeyphrase = 1
MaxNbOfKeywordsShown = 10
MinHitKeyword = 1
MaxNbOfEMailsShown = 20
MinHitEMail = 1

FirstDayOfWeek=1
ShowFlagLinks="en es fr nl es"
ShowLinksOnUrl=1
UseHTTPSLinkForUrl=""
MaxLengthOfShownURL=64
HTMLHeadSection=""
HTMLEndSection=""
Logo="awstats_logo6.png"
LogoLink="http://awstats.sourceforge.net"
BarWidth = 260
BarHeight = 90
StyleSheet=""

color_Background="FFFFFF"
color_TableBGTitle="CCCCDD"
color_TableTitle="000000"
color_TableBG="CCCCDD"
color_TableRowTitle="FFFFFF"
color_TableBGRowTitle="ECECEC"
color_TableBorder="ECECEC"
color_text="000000"
color_textpercent="606060"
color_titletext="000000"
color_weekend="EAEAEA"
color_link="0011BB"
color_hover="605040"
color_u="FFAA66"
color_v="F4F090"
color_p="4477DD"
color_h="66DDEE"
color_k="2EA495"
color_s="8888DD"
color_e="CEC2E8"
color_x="C1B2E2"

# Param LogFile added by AWStats Webmin module LogFile="/usr/local/apache/logs/karma-access_log"

----------------------------------------------------------------

Je veux donc accéder aux résultats des stats via l'url :
http://nsxxxx.ovh.net/cgi-bin/awstat...r=/etc/awstats

Mais il m'affiche une erreur 500.

Merci pour l'aide
karma est déconnecté   Réponse avec citation
Vieux 11/02/2004, 21h49   #5
nerick04
Membre
 
Date d'inscription: février 2004
Messages: 11
voila je viens de fiare l'instalation et tous marche jusqu'a l'affichage des resultats où j'obtiens une erreur 500. En allant voir dans les logs, j'ai cela comme erreur:
Citation:
Premature end of script headers: /home/ovh/cgi-bin/awstats.pl
Et j'utilise cette adresse pour aller voir mes stats:
Citation:
http://ns30xxx.ovh.net/cgi-bin/awstats.pl?config=mondomaine
et j'ai aussi essayer avec cette ligne:
Citation:
http://ns30xxx.ovh.net/cgi-bin/awstats.pl?config=mondomaine&configdir=/etc/awstats
Si quelqu'un a une solution ca serai vraiment bien!
Merci d'avance
nerick04 est déconnecté   Réponse avec citation
Vieux 11/02/2004, 22h44   #6
Daweb
Membre
 
Date d'inscription: février 2004
Messages: 1 471
J'ai le même problème, erreur 500...
Dans le log error d'apache j'ai :

Premature end of script headers

Apparement ce doit être un problème de droits CGI, mais je ne trouve pas !!!
Daweb est déconnecté   Réponse avec citation
Vieux 12/02/2004, 01h50   #7
Elgi
Membre
 
Date d'inscription: février 2004
Messages: 2 083
Envoyer un message via MSN à Elgi
...
__________________
Guides et tutoriels libres, ouvert à tous, apportez vous aussi votre contribution : http://wiki.sos-admin.com
Cordialement, Elgi http://www.elginux.com

Dernière modification par Elgi 17/03/2007 à 18h00
Elgi est déconnecté   Réponse avec citation
Vieux 12/02/2004, 10h09   #8
karma
Membre
 
Date d'inscription: février 2004
Messages: 120
Post

Toujours le même prb même après avoir executer ces commandes une erreur 500.
karma est déconnecté   Réponse avec citation
Vieux 12/02/2004, 11h22   #9
Elgi
Membre
 
Date d'inscription: février 2004
Messages: 2 083
Envoyer un message via MSN à Elgi
...
__________________
Guides et tutoriels libres, ouvert à tous, apportez vous aussi votre contribution : http://wiki.sos-admin.com
Cordialement, Elgi http://www.elginux.com

Dernière modification par Elgi 17/03/2007 à 18h00
Elgi est déconnecté   Réponse avec citation
Vieux 12/02/2004, 12h14   #10
karma
Membre
 
Date d'inscription: février 2004
Messages: 120
D'bord je vous remercie pour votre intérêt.

Oui je suis bien en release ovh.

Voilà le résultat de la commande.

[root@ns3567 root]# ls -al /home/ovh/cgi-bin/
total 1292
drwxr-xr-x 6 vpopmail vchkpw 4096 fév 11 12:08 .
drwxr-xr-x 6 ovh ovh 4096 déc 17 2002 ..
-rwxr-xr-x 1 ovh ovh 5407 fév 11 12:07 awredir.pl
-rwxr-xr-x 1 ovh ovh 18472 fév 11 12:08 awstats_buildstaticpages.pl
-rwxr-xr-x 1 ovh ovh 12767 fév 11 12:08 awstats_exportlib.pl
-r--r--r-- 1 root root 51900 fév 11 12:07 awstats.model.conf
-rwxr-xr-x 1 ovh ovh 515656 fév 11 12:07 awstats.pl
-rwxr-xr-x 1 ovh ovh 4576 fév 11 12:08 awstats_updateall.pl
-rwxr-xr-x 1 ovh ovh 22212 fév 11 12:08 configure.pl
drwxr-xr-x 2 root root 4096 fév 11 12:07 lang
drwxr-xr-x 2 root root 4096 fév 11 12:07 lib
-rwxr-xr-x 1 ovh ovh 27513 fév 11 12:08 logresolvemerge.pl
-rwxr-xr-x 1 ovh ovh 25133 fév 11 12:08 maillogconvert.pl
drwxr-xr-x 3 root root 4096 fév 11 12:07 plugins
drwxr-xr-x 3 vpopmail vchkpw 4096 jui 9 2003 qalm
-rw-r--r-- 1 root root 10235 jan 6 2002 qalm.tar.gz
-rwxr-xr-x 1 vpopmail vchkpw 103740 jun 2 2003 qmailadmin
-rwxr-xr-x 1 vpopmail vchkpw 444248 jun 2 2003 sqwebmail
-rwxr-xr-x 1 ovh ovh 10535 fév 11 12:08 urlaliasbuilder.pl


Merci
karma est déconnecté   Réponse avec citation
Réponse

Outils de la discussion

Règles de messages
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is oui
Les smileys sont activés : oui
La balise [IMG] est activée : non
Le code HTML peut être employé : non



Fuseau horaire GMT +1. Il est actuellement 21h18.


© OVH 1999-2010