Rotating web server logs without restarting Apache

Dan O'Connor dan at ferrarishields.com
Sat Nov 26 00:38:19 GMT 2005


> Every time my httpd-access.log file is rotated I need to restart 
> Apache,
> otherwise it won't write into the new httpd-access.log file.

In /etc/newsyslog.conf:

/var/log/httpd-access.log               644  4     100  *     J 
/var/run/httpd.pid  30
/var/log/httpd-error.log                644  4     100  *     J 
/var/run/httpd.pid  30

This will signal apache to do a graceful restart following a log 
rotation...

~Dan




More information about the freebsd-stable mailing list