2

The error log file was quite big so I deleted it and created it again.. But now the error log is not logging/updating on errors?

Have tried to respart apache, but still the same..

I remember I experienced this a while ago.. Can't remember how it was fixed?

5

Apache keeps its log files open so deleting a log file stops apache from logging to it, since the old file descriptor now points to a deleted inode.

You should rotate/delete/truncate the log file, re-create it with the correct ownership and permissions, and then issue an apachectl graceful to reload.

Alternatively, apache can log errors to syslog; this does not suffer from the same limitations.

1

Alternatively, you may want to use rotatelogs to constrain size/age of your httpd logs.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.