PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Forums Hébergement > Forum Serveur - Sécurité et techniques > alt.apache.configuration > splitting logs per domain when using Dynamic Virtual Hosts
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
alt.apache.configuration Apache web server configuration issues.

splitting logs per domain when using Dynamic Virtual Hosts

Réponse
 
LinkBack Outils de la discussion
Vieux 08/05/2007, 12h10   #1
Dr.Bob
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut splitting logs per domain when using Dynamic Virtual Hosts

Hi all,

I have the following issue: My apache2 is setup with Dynamic Virtual Hosts,
so as long as the right directory stucture exists I can serve the website
(e.g. the website www.domain.com relies on the existance of the path
/home/sites/domain.com/www.domain.com/html)

But all logentries for all my domains end up in one place,
/home/logs/accesslog

Is there a way to automatically generate a logfile per 'dynamic domain' so
in the example above that automatically a logfile is made like
/home/logs/accesslog_www.domain.com?

Thanks in advance,
Dr.Bob


  Réponse avec citation
Vieux 08/05/2007, 12h14   #2
Davide Bianchi
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: splitting logs per domain when using Dynamic Virtual Hosts

On 2007-05-08, Dr.Bob <dr.bob.says.no.to.spammm@xs4all.nl> wrote:
> Is there a way to automatically generate a logfile per 'dynamic domain' so
> in the example above that automatically a logfile is made like
> /home/logs/accesslog_www.domain.com?


You could pipe the logs into a script and do the splitting there, or
process the logs at logrotating time and split them at once.

Davide


--
"A copy of Windows 95 and 4x4 MB of SIMMs, please."
  Réponse avec citation
Vieux 08/05/2007, 12h17   #3
shimmyshack
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: splitting logs per domain when using Dynamic Virtual Hosts

On May 8, 12:10 pm, "Dr.Bob" <dr.bob.says.no.to.spa...@xs4all.nl>
wrote:
> Hi all,
>
> I have the following issue: My apache2 is setup with Dynamic Virtual Hosts,
> so as long as the right directory stucture exists I can serve the website
> (e.g. the websitewww.domain.comrelies on the existance of the path
> /home/sites/domain.com/www.domain.com/html)
>
> But all logentries for all my domains end up in one place,
> /home/logs/accesslog
>
> Is there a way to automatically generate a logfile per 'dynamic domain' so
> in the example above that automatically a logfile is made like
> /home/logs/accesslog_www.domain.com?
>
> Thanks in advance,
> Dr.Bob


its not generally a good idea to have of the order of a hundred files
open at once like that.
http://httpd.apache.org/docs/2.0/vhosts/fd-limits.html
I use DCMVH too, and use one log file which I split each night using
cron.
have you seen the apache docs on piping your log file thtugh a
splitting script, so its"live" this is great is you can rely on your
script not to hang. http://httpd.apache.org/docs/2.0/logs.html#piped

  Réponse avec citation
Vieux 08/05/2007, 12h58   #4
Dr.Bob
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: splitting logs per domain when using Dynamic Virtual Hosts

Sounds like a great solution :-)

Thank both, for the directions!

Dr.Bob

"Dr.Bob" <dr.bob.says.no.to.spammm@xs4all.nl> wrote in message
news:46405a4c$0$22675$e4fe514c@dreader31.news.xs4a ll.nl...
> Hi all,
>
> I have the following issue: My apache2 is setup with Dynamic Virtual
> Hosts, so as long as the right directory stucture exists I can serve the
> website (e.g. the website www.domain.com relies on the existance of the
> path /home/sites/domain.com/www.domain.com/html)
>
> But all logentries for all my domains end up in one place,
> /home/logs/accesslog
>
> Is there a way to automatically generate a logfile per 'dynamic domain' so
> in the example above that automatically a logfile is made like
> /home/logs/accesslog_www.domain.com?
>
> Thanks in advance,
> Dr.Bob
>



  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 07h38.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,09999 seconds with 12 queries