Cronlog

IIS makes it really easy to maintain your log files… in fact, you don’t have to do anything tricky besides checking the appropriate checkbox. Apache on the other hand is a bit more complicated… I did a couple googles tonight looking for the perfect, easy 5 minute solution. This is what I found. Download the source, unzip, run ./configure, run make, run make install and then change your log settings within the appropriate context of your httpd.conf (I put the following directive within each virtual host definition) to something like this:

CustomLog “|/usr/local/sbin/cronolog /etc/httpd/logs/yoursite.com/%Y%m.log” combined

Save httpd.conf and restart Apache.

That’ll create a log file that looks like this:

/etc/httpd/logs/yoursite.com/200303.log

Pretty handy.

Leave a Reply

Your email address will not be published. Required fields are marked *