My apache log file has become too big again. This time I am going to rotate them properly, unlike last time (http://blog.dalegroup.net/archive/blog/newsid/70).
Log files cannot be removed directly while apache is running because the server is writing directly to them. The solution is to use an intermediate program to log the requests. The program will, in turn, take care of rotating the logs.
This is where rotatelogs.exe comes in (a program that is packaged with apache).
What happens is a new file is created with the current time and date; the new log information is then entered. The old log file is now able to be deleted or archived as it is no longer in use. This does break awstats as the log file name keeps changing. Currently: access.2004-10-09-10_51_07
This only effects the forums as I haven’t does this on any other website yet. I’ll need to look into a way to make sure awstats works with it.
The configuration that does this is: CustomLog "|E:/Apache2/bin/rotatelogs.exe e:/hosted/forums/logs/access.%Y-%m-%d-%H_%M_%S 30M" combined and is stored in the httpd.conf file. Although I maybe possible to do this with .htaccess. This rotates the file once it reaches 30mb (although you can make it happen for a set time).
So yeah.
On a quick note, I’ve changed my email address. The old one still works. Any further emails/replies from me will be from the new address, you can just contact me from the contact page if it is easier.
Copyright © Michael Dale 2004.
Page generated in 0.0043 seconds FreeBSD Powered
Background on style 5 is used from squidfingers How are we going? 3 queries
urls become clickable
[b]place text in bold[/b]
[i]place text in italics[/i]
[quote]place text in a quote[/quote]