Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

While working on another task that took me to my /var/log directory, I happened to notice a file named http-mywebsitename.com-access.log that was 50Gb in size. Not exactly knowing what it was I found a file growing to such a size to be a little alarming, so I looked inside the file. It just seemed to be a record of every files' access.

While that could be useful I suppose, I couldn't think of any present use for a 50Gb record, so I emptied the file to free the space and went on with my business. Five days later, it is 60Mb again. So here are my questions:

  1. Where does one turn this log on and off?
  2. What controls the level of granularity saved in this log?
  3. Why would I want to keep a multi-Gb access log around?
share|improve this question

migrated from stackoverflow.com Jul 25 '11 at 20:14

This question came from our site for professional and enthusiast programmers.

add comment

1 Answer

up vote 2 down vote accepted

You need to use log rotate

http://httpd.apache.org/docs/2.0/programs/rotatelogs.html

It will automatically eliminate old logs

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.