Why does Apache refuse to write to log files (the ErrorLog
/CustomLog
ones) after I have manually deleted their contents?
It will not write to those log files again until after I restart Apache.
Why is this the case? How can I safely purge a log file without having to restart Apache?
I have Apache 2.2.14 on Ubuntu 10.04.
logrotate
which sends an appropriate reload/restart signal to Apache(See Pedro's answer below). Nickgrim covered the "why" behind your logs stopping -- Apache is still writing to the old inode (which is no longer connected to the filesystem anywhere you can get at it)