httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jacob Coby" <jc...@listingbook.com>
Subject Re: failure notice
Date Fri, 23 Aug 2002 13:43:11 GMT
> Do you need to stop the apache process to rotate logs?  Some documentation
> I read indicated you had to and some didn't.  I did find this script on
the
> Sun site.  It just appears to copy and compress the logs and then performs
> a touch to 0 it out.  Any thoughts or experience with this?

You'll need to do a killall -SIGHUP after you've rotated the logs, else
apache won't be able to write to the new log.

I use logrotate, much simpler to debug :).

-- /etc/logrotate.d/httpd --
# rotate apache logs
#size=25M
/usr/local/apache/logs/*_log /usr/local/apache/logs/listingbook.com/*_log {
        daily
        rotate 5
        create 644
        missingok

        postrotate
                /usr/bin/killall -HUP /usr/local/apache/bin/httpd
        endscript
}
-- end --

-Jacob
http://www.listingbook.com


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message