Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

share|improve this question

2 Answers 2

up vote 5 down vote accepted

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.

share|improve this answer

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

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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