This one time, at band camp, Michael Lake wrote:
>Michael Lake wrote:
>
>and now I have also seen /etc/apache/cron.conf taht sets daily rotation 
>things and is mentioned in httpd.conf
>Three places to set rotation ?????

Sounds messy.

What's in each of the files?  Perhaps the logrotate script takes care of
the rotation, and the cron.daily script just HUP's the webserver?  The
fragment of logrotate you posted doesn't seem to do the HUPing[1].

On our webservers, we do the entire rotation from logrotate, including
the HUP:

/var/log/httpd/*_log /var/log/httpd/*/*_log {
    missingok
    notifempty
    sharedscripts
    daily
    rotate 365
    compress
    delaycompress
    postrotate
        /bin/kill -HUP `cat /var/run/httpd.pid 2>/dev/null` 2> /dev/null || true       
 /usr/local/sbin/webalize || true
    endscript
}

>> 1. Whats sets the log rotate times?
>> 2. Do I need to HUP anything for changes in /etc/logrotate.d/apache-perl 
>> config file?

cron runs logrotate, and the cron.daily script, so:
- you don't need to restart anything
- somewhere in the maze of crontabs and fragments you'll find when the
  rotation is occurring


[1] SIGHUP, or Hangup, tells the webserver to close the logfile it's
writing to and reopen it.  Using the power of inodes, this means that
you (logrotate) can rename the file while apache is still logging to it,
and not lose any data.  Then when you've renamed it you tell Apache that
it needs to start writing to a new file by sending a SIGHUP to the
process; it closes the file descriptor it was writing to and creates a
file with the original name, and starts logging there.

-- 
[EMAIL PROTECTED]                           http://spacepants.org/jaq.gpg
-- 
SLUG - Sydney Linux User's Group - http://slug.org.au/
More Info: http://lists.slug.org.au/listinfo/slug

Reply via email to