splitting logs per domain when using Dynamic Virtual Hosts
am 08.05.2007 13:10:48 von dr.bob.says.no.to.spammm
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
Re: splitting logs per domain when using Dynamic Virtual Hosts
am 08.05.2007 13:17:11 von shimmyshack
On May 8, 12:10 pm, "Dr.Bob"
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
Re: splitting logs per domain when using Dynamic Virtual Hosts
am 08.05.2007 13:58:07 von dr.bob.says.no.to.spammm
Sounds like a great solution :-)
Thank both, for the directions!
Dr.Bob
"Dr.Bob" wrote in message
news:46405a4c$0$22675$e4fe514c@dreader31.news.xs4all.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
>