The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Daily log rotation is not enough for my site

Discussion in 'General Discussion' started by Get Free, Apr 23, 2009.

  1. Get Free

    Get Free Member

    Joined:
    Apr 26, 2007
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    The apache log of my website reaches the 2GB limit in about 20 hours. Due to this daily log rotation is not enough for me. I need the logs to be rotated more than once a day.
    How can I accomplish this in a WHM/cPanel server?
    Is there a file somewhere that I could edit to set this?

    Thanks.
     
  2. Get Free

    Get Free Member

    Joined:
    Apr 26, 2007
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Anyone??
    I know how to do this on a normal server, but on a server with cPanel the logs are used by awStats and other services so I wouldn't know where to save the rotated log files (and what filename to use) if I do this, for example, using a pipe to the rotatelogs program.

    Plus, as I understand, the httpd.conf file is rewritten when you make a change in cPanel or WHM, so manually editing httpd.conf wouldn't be a reliable solution.

    There has to be a cPanel config file where I can change this. Does anyone know anything??
     
  3. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    You could set your logs to be rotated when stats are run, and run web stats more frequently than every 24 hours. However, this can have secondary side-effects such as stats processing never completing (thus stats not updating for some sites). Keep a close eye on the Statistics Software Configuration page in WHM if you do lower this to be more frequent than 24 hours to ensure that the stats processing can keep up.
     
  4. Get Free

    Get Free Member

    Joined:
    Apr 26, 2007
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Thanks, David. I set stats to be run every 15 hours. But I dont know where can I set logs to be rotated when stats are run.
    Where I can find that? in WHM or in cPanel?
    I have cPanel 11.24.4-R35075 - WHM 11.24.2 - X 3.9

    Thanks in advance.
     
  5. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    For an individual website (which is the case here), you would go into your cPanel interface, click the "Raw Access Logs" icon and check the checkbox that says "Archive Logs in your home directory at the end of each stats run" and then click "Save."
     
  6. Get Free

    Get Free Member

    Joined:
    Apr 26, 2007
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Oh, perfect. I have that set already.

    Thanks.
     
Loading...

Share This Page