Page 1 of 1

Limit the size of the access log

PostPosted: 31. January 2009 21:36
by DurkO
Is there a way to limit the size of the access log? My log had grown over 250 MB, so it took a while loading it in my reader :(

Re: Limit the size of the access log

PostPosted: 31. January 2009 23:08
by Izzy
There is no built in way to do this.

You would need to write a script or a batch file to do it or simply stop Apache and open the access file in a text editor and delete the contents, save and restart Apache as often as required manually.

This link has a batch (.bat) file that may do the trick but I have not tested it and you will have to download the free 7zip archive software with a command line interface as outlined in the comprehensive instructions in the batch code.

Please let us know if you get the batch file working.
Thanks.