why is web traffic being written to the rotated log file?

Chris W. Parker cparker at swatgear.com
Tue Mar 28 23:23:20 UTC 2006


Tom Callahan <mailto:callahant at tessco.com>
    on Tuesday, March 28, 2006 1:58 PM said:

> add a "endscript" to your logrotate config for httpd.
> script to run is "    kill -USR1 `cat /location/of/httpd.pid`   "
> 
> This will issue a graceful restart. Make sure you point it to the
> correct pid file.

Thanks Alfred and Tom for the advice. I have two websites logging to
different locations and therefore also have two different httpd
logrotate files. Here is the output of both files:

1| /var/log/httpd/sites/website.com/*log {
2|     missingok
3|     notifempty
4|     sharedscripts
5|     postrotate
6|         /bin/kill -HUP `cat /var/run/httpd.pid 2>/dev/null` 2>
/dev/null || true
7|     endscript
8| }

They are identical files except for line #1 which differs only in which
website's logs the file is pointed at.

Looks like I've already got the "graceful restart" in there so hopefully
this sheds some more light on the situation.



Thank you!
Chris.




More information about the redhat-list mailing list