[BlueOnyx:09096] Re: Logrotate and access_log
Michael Stauber
mstauber at blueonyx.it
Tue Nov 22 16:36:16 -05 2011
Hi Don,
> Running 5107R, and have noticed something odd. No idea how this happened
> (or obviously how to fix.)
>
> Each night after logrotate runs, Apache seems to be unable to log to
> /var/log/httpd/access_log without a httpd restart.
>
> Can someone point me in the right direction on this one?
I just found and fixed that one. Am publishing updates for 5107R and 5108R
now.
The problem was in /etc/logrotate.d/apache. Apache is restarted this way in it
after a logrotate:
/bin/kill -HUP `cat /var/run/httpd.pid 2>/dev/null` 2> /dev/null || true
Which works on RHEL5 clones like CentOS5, but on RHEL6 clones (like CentOS6 or
SL6) the Apache PID file is now located at /var/run/httpd/httpd.pid instead.
--
With best regards
Michael Stauber
More information about the Blueonyx
mailing list