Apache access logs
Posted by: aaron (---.pools.arcor-ip.net)
Date: October 22, 2006 09:55PM

Did a search on the forums and couldn't find an answer, so here goes my question. How should I go about limiting the size of the Apache access logs? I'm running the latest WAMP, and have noticed that my access log grows very fast. The only thing I can do is stop the server, go into the txt file, select and delete everything, then save the file and restart the server. I've searched on the net and I've seen things about rotating logs, but not sure how that works. What is the best solution for automatic deletion of old entries? I'm just afraid of going away for awhile and not being able to check on the access log, and then find out it's grow way to big to handle.


Options: ReplyQuote
Re: Apache access logs
Posted by: CyberSpatium (71.237.217.---)
Date: October 23, 2006 05:22PM

there is not setting in httpd.conf to delete old log entries. the best way to do it is to write a php or perl script that either deletes the whole log, or deletes entries in the log older than a specified number of days. you will also need to use cron so seclude when the script should run. since cron is not supported on windows you will have to use windows scheduled tasks instead, or download and install a freeware cron type program for windows.

Options: ReplyQuote


Sorry, only registered users may post in this forum.