Apache Log Files

Discussion in 'Apache' started by pkallberg21, Sep 16, 2007.

  1. #1
    My Apache log files are huge, and increasing greatly everyday. At the moment the access log is 4,5 GB. How can I minimize this logging to prevent this?
     
    pkallberg21, Sep 16, 2007 IP
  2. readme

    readme Banned

    Messages:
    103
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Access logs are quite useless. I expect you are talking about domlogs, is there any problem if you delete all of them?
     
    readme, Sep 16, 2007 IP
  3. pkallberg21

    pkallberg21 Peon

    Messages:
    295
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #3
    I am referring to the access.log file in the logs folder of Apache.
     
    pkallberg21, Sep 16, 2007 IP
  4. SeanW

    SeanW Peon

    Messages:
    5
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    You'll want to look at rotating the logs. The involves moving the log to a new location (or renaming) and then restarting the web server so it creates a new log. You can then do what you want with the log file - compress, delete, archive, whatever.

    In Linux this is done through the logrotate program, if you search around you can find some batch jobs to do the same on Windows. "windows logrotate" showed some promising results.

    Sean
     
    SeanW, Sep 17, 2007 IP