From 65b98f232218ac040c932d748b80764b3399abed Mon Sep 17 00:00:00 2001 From: gcolpart Date: Mon, 21 Nov 2016 15:16:43 +0100 Subject: [PATCH] ajout d'une section sur les logs --- HowtoApache.md | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/HowtoApache.md b/HowtoApache.md index d3af942d..74b46c8b 100644 --- a/HowtoApache.md +++ b/HowtoApache.md @@ -231,6 +231,31 @@ La configuration d'un VirtualHost pour HTTPS pourra ainsi ressembler à : Pour une configuration avancée des paramètres SSL, voir [HowtoSSL#configuration-apache]() +## Logs + + + +La directive **CustomLog** permet de définir le journal des accès ; plusieurs formats existent : combined, common, vhost_combined, etc. +Cette directive peut être utilisée plusieurs fois, il y aura plusieurs fichiers de logs différents. + +~~~{.apache} +CustomLog log/global_access.log vhost_combined +CustomLog log/access.log combined +~~~ + +Si besoin, on peut ignorer certaines requêtes HTTP ainsi : + +~~~{.apache} +SetEnvIf User-Agent "Foo" dontlog +CustomLog log/access.log combined env=!dontlog +~~~ + +La directive **ErrorLog** permet de définir le journal d'erreurs Apache. + +~~~{.apache} +ErrorLog log/error.log +~~~ + ## Configuration avancée ### mod_deflate