i'm using logrotate to rotate my apache logs, and the rotation works fine.
the problem is, after rotating, apache keeps writing to the old log.
i tried 3 different methods of apache restart (through logrotate script) but none helped.
i have http.log, and it's rotating to http.log.1
apache keeps writing to http.log.1
and the new http.log stays empty.
the three methods i tried to restart apache with are:
/bin/kill -HUP `cat /var/run/httpd.pid 2>/dev/null` 2> /dev/null || true
/bin/kill -USR1 `cat /var/run/httpd.pid 2>/dev/null` 2> /dev/null || true
do i need to say that the restart should be quick/easy so the users will not feel it ?