[TriLUG] webalizer and Apache VirtualHosts AND log rotate

Ryan Wheaton ryan.wheaton at comcast.net
Wed May 5 11:17:47 EDT 2004


On Wednesday, May 5, 2004, at 06:48 America/Denver, Turnpike Man wrote:
> Speaking of LOG ROTATE: Will these individual access logs that are 
> setup for
> these VirtualHosts rotate on their own??  It just occurred to me I 
> never paid
> any attention to that over the last 12 months with my previous install 
> prior to
> its crash.

well, it depends.  if you left your apache config pretty much to the 
defaults, and set up your virtual hosts according to that (and put each 
VH log in /var/log/httpd/) then you should be alright.  check out 
/etc/logrotate.d/httpd

here's mine:

# cat /etc/logrotate.d/httpd
/var/log/httpd/*log {
     missingok
     notifempty
     sharedscripts
     postrotate
         /bin/kill -HUP `cat /var/run/httpd.pid 2>/dev/null` 2> 
/dev/null || true
     endscript
}


hth,

-r





More information about the TriLUG mailing list