Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 5 of 5
  1. #1
    Member
    Join Date
    Feb 2005
    Posts
    10

    Question How to keep longest access_log for all accounts???

    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. #2
    cPanel Partner NOC cPanel Partner NOC Badge
    Join Date
    Mar 2003
    Location
    NC
    Posts
    725
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    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. #3
    Moderator cPanel Partner NOC Badge dgbaker's Avatar
    Join Date
    Sep 2002
    Location
    Toronto, Ontario Canada
    Posts
    2,773

    Default

    Keep in mind the 2gb limit for files. The log files need to be rotated before they reach 2gb in size.
    Regards,
    David
    Forum Moderator

  4. #4
    cPanel Partner NOC cPanel Partner NOC Badge
    Join Date
    Jul 2005
    Location
    New Jersey, USA
    Posts
    397

    Default

    One way to do that is if you customize the logrotate settings, you can make it archive specific logs anyway you want

  5. #5
    Member
    Join Date
    Feb 2005
    Posts
    10

    Default

    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

Similar Threads & Tags
Similar threads

  1. Bring Back Use of Apache access_log for all hosting accounts!
    By ckh in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 08-11-2011, 06:16 PM
  2. error_log,access_log control
    By h0tmailz in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 02-11-2009, 02:30 PM
  3. access_log scanning security
    By bsasninja in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 09-20-2007, 10:01 AM
  4. Access_log - Big problem
    By MrNone in forum cPanel and WHM Discussions
    Replies: 3
    Last Post: 07-05-2005, 03:37 PM
  5. access_log
    By precise in forum cPanel and WHM Discussions
    Replies: 7
    Last Post: 03-28-2002, 03:50 AM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube