PDA

View Full Version : Apache2 and logs


SychoSly
July 31st, 2005, 10:44 PM
I am running ubuntu and apache, mysql, php, and all that good stuff. I went into my logs directory for apache2 and they were taking up a lot of room on the system so I deleted everything that was in the folder and now apache doesn't produce any logs.

Do I have to reinstall apache2? If so does that mean I have to uninstall it, and then reinstall it?

Thanks.

heimo
July 31st, 2005, 10:49 PM
To restart Apache2:
sudo /etc/init.d/apache2 restart


You should probably just rotate the logs (man logrotate).

LordHunter317
July 31st, 2005, 11:48 PM
Apache logs shouldn't take up a lot of space unless you're getting lots of hits.

Deleting the active logfile won't cause apache to stop logging: it'll just log to the deleted inode; taking up space until the log is rotated. Never delete a log file without a number appended to the name unless you know exactly what you're doing.

SychoSly
August 1st, 2005, 07:47 PM
To restart Apache2:
sudo /etc/init.d/apache2 restart


You should probably just rotate the logs (man logrotate).


Restarting Apache fixed it. Thanks.