Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 597
  • Last Modified:

How to use the rotatelog.exe in apache to create new log each day?

Hi Experts,

I am trying to get my newly setup Apache Web server to divide up the access.log each day @ 00:00, so that it won't grow too big, as well as providing a way to daily log for analysis (how many visits & pageviews).

I read from a few places about the rotatelog.exe that can be used to divide log.  However, I experienced for a few hours and still couldn't figure out how that works.  (sorry, I am new to apache)... can any one explains it in details as how that works?

What I had tried:

1. Install Apache 2.2.9 in windows 2003 Standard server
2. In C:\Program Files\Apache Software Foundation\Apache2.2\conf\, modifed the "http.conf" to use "customlog" as follow:
    CustomLog "|bin/rotatelogs logs/access_%Y-%m-%d--%H-%M-%S.log 86400" combined
3.changed the system clock to 24 hours later
4. hit F5 to refresh the http://localhost
5. Result is that,the log is still kept in the original access.log file, but not break into a new file.

Do I have the concept mis-understood?  Thanks very much
1 Solution
wingkchanAuthor Commented:
Oh.... I dug a little further and see that apache needs to be restart to take effect....


Featured Post

[Webinar] Database Backup and Recovery

Does your company store data on premises, off site, in the cloud, or a combination of these? If you answered “yes”, you need a data backup recovery plan that fits each and every platform. Watch now as as Percona teaches us how to build agile data backup recovery plan.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now