We're using the following in our newsyslog.conf file: "(/usr/sbin/apachectl stop; (while `/usr/bin/pgrep httpd > /dev/null 2>&1`; do /bin/sleep 1; done); /usr/sbin/apachectl start) > /dev/null 2>&1"
On Fri, Dec 09, 2005 at 01:45:51PM +0800, Uwe Dippel wrote: > There are many posts on this problem; and the reason is understood. > > To me, the FAQ 10.16 seems wrong: > > Log Rotation: Normally, logs are rotated by renaming the old files, > then sending httpd(8) a SIGUSR1 signal to cause Apache to close its old > log files and open new ones. This is no longer possible, as httpd(8) has > no ability to open log files for writing once privileges are dropped. > httpd(8) must be stopped and restarted: > # apachectl stop && apachectl start > > This is all I get here: > # apachectl stop && > /usr/sbin/apachectl stop: httpd stopped > /usr/sbin/apachectl start: httpd (pid 18132) already running > > In the end, it doesn't restart; leaving the users out until I wait and > restart httpd > > And the log isn't rotated neither. Chances are, the author meant something > like > # apachectl stop > # [newsyslog or similar] > # apachectl start > > If the text in the FAQ just kills httpd, it ought to be corrected, AFAICS. > > Could you please share your preferred methods to rotate the > /var/www/logs/, ? > > Thanks, > > Uwe > -- Egbert Krook System/Network Engineer Amarin Printing and Publishing Public Co., Ltd. "And that's why we were unable to move the process forward."

