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.

How to keep longest access_log for all accounts???

Discussion in 'General Discussion' started by SlyGhost, Jun 1, 2009.

  1. SlyGhost

    SlyGhost Member

    Joined:
    Feb 15, 2005
    Messages:
    11
    Likes Received:
    0
    Trophy Points:
    1
    Hi,

    I was wondering what setting I should check for keeping longest access_logs for every domain.

    For example when I check ls -la /usr/local/apache/domlogs , I see every domain's log files there but when I download one , I see its rotated daily around 3am every day , so its a DAILY log and I can't check 2 days ago :(

    I want to keep those files lets say for 3 days , NOT auto deleted/updated daily, let them keep for 3 or more days and then delete/update automatically...

    WHM > Main >> Server Configuration >> Tweak Settings > Stats and Logs > Number of days between processing log files and bandwidth usage (default 1, decimal values are ok) = I saw that one was set to 1 , if that was causing???

    Is there any other setting I should look for to make all those logs be kept for more than 1 day ? lets say 3 days ... (NO need to compress and keep as backups , I dont need it , I only need those real log files be kept for 3 or more days...)

    Another question, is it possible to make it lets say "domain1 = keep the log for 2 days , domain2 = keep it for 7 days..." ???

    Thanks in advance...
     
  2. eth00

    eth00 Well-Known Member
    PartnerNOC

    Joined:
    Mar 30, 2003
    Messages:
    723
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    NC
    cPanel Access Level:
    Root Administrator
    That option is how often the cPanel stats software processes them.

    In tweak settings you could turn off the out rotate logs daily.

    If you want to have different dates to rotate them I would suggest looking at "logrotate" and setting up a custom ruleset for your domlogs directory. cPanel either has every day or none at all, relying on logrotate.
     
  3. dgbaker

    dgbaker Well-Known Member
    PartnerNOC

    Joined:
    Sep 20, 2002
    Messages:
    2,578
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    Toronto, Ontario Canada
    cPanel Access Level:
    DataCenter Provider
    Keep in mind the 2gb limit for files. The log files need to be rotated before they reach 2gb in size.
     
  4. PlatinumServerM

    PlatinumServerM Well-Known Member
    PartnerNOC

    Joined:
    Jul 10, 2005
    Messages:
    397
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    New Jersey, USA
    cPanel Access Level:
    Root Administrator
  5. SlyGhost

    SlyGhost Member

    Joined:
    Feb 15, 2005
    Messages:
    11
    Likes Received:
    0
    Trophy Points:
    1
    I've changed this one:

    WHM > Main >> Server Configuration >> Tweak Settings > Stats and Logs > Number of days between processing log files and bandwidth usage (default 1, decimal values are ok) = 5

    and looks like it didn't clean logs yet since 24 hours , I will see tomorrow if its still growing until 5 days , if so , I will make it to keep for a reasonable time like 3 days... Just I don't want daily , 2 days or 3 days is ok for me :)

    Thanks a lot for all the responses ;)
     
Loading...

Share This Page