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.

Keeping web sites access logs

Discussion in 'General Discussion' started by flashweb, Sep 30, 2006.

  1. flashweb

    flashweb Well-Known Member

    Joined:
    Mar 13, 2003
    Messages:
    243
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    Root Administrator
    Hi,

    Web sites access logs are rotated everyday.

    /usr/local/apache/domlogs

    Is it possible for me to configure cpanel server so that Apache Logs are kept some days (example 10 days) then delete them ? This way if some sites got hacked, we can check old Apache log files.

    Regards,

    Yujin
     
  2. Manuel_accu

    Manuel_accu Well-Known Member

    Joined:
    Jun 19, 2005
    Messages:
    191
    Likes Received:
    0
    Trophy Points:
    16
    Hi,

    Check the logrotate configuration file located at:

    /etc/logrotate.conf

    and modify the time period to weekly.

    Thanks!
     
  3. flashweb

    flashweb Well-Known Member

    Joined:
    Mar 13, 2003
    Messages:
    243
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    Root Administrator
    Nothing related http logs in

    /etc/logrotate.conf or /etc/logrotate.d

    It seems these are handled some other way in Cpanel Server.
     
  4. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    cPanel doesn't use logrotate to rotate the domlogs as you've discovered. They're rotated by the logrunner process which is controlled by the WHM > Tweak Settings:

    Delete each domain's access logs after stats run
    Keep log files at the end of the month (default is off as you can run out of disk space quickly)

    That's about as much control as you have.
     
  5. flashweb

    flashweb Well-Known Member

    Joined:
    Mar 13, 2003
    Messages:
    243
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    Root Administrator
    I have already seen the option to keep log for a month. I don't want to keep all logs for a month. Is there any way i can keep log file for few days, say 5 days ?
     
  6. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    Nope, that's all there is.
     
  7. mambovince

    mambovince Well-Known Member

    Joined:
    Jan 15, 2005
    Messages:
    192
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    London, UK
    What if client sets in their own cPanel "Raw Log Manager"
    1. Archive Logs in your home directory at the end of each stats run [every 1 day(s)]

    Does that over-ride whatever we set in WHM?

    They can also set:
    2. Remove the previous month's archived logs from your home directory at the end of each month

    But we cannot seem to set this in WHM

    - Vince
     
  8. mambovince

    mambovince Well-Known Member

    Joined:
    Jan 15, 2005
    Messages:
    192
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    London, UK
  9. ujr

    ujr Well-Known Member

    Joined:
    Mar 19, 2004
    Messages:
    290
    Likes Received:
    0
    Trophy Points:
    16
  10. mambovince

    mambovince Well-Known Member

    Joined:
    Jan 15, 2005
    Messages:
    192
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    London, UK
    TYhe question is not if rotation works or not, but how cPanel handles rotation.

    See my previous post with reply from Chirpy, and my following question number 1

    There seems to be a conflict.

    Which setting 'wins' and how does this affect hosted clients expectations?

    Hope that was clearer. :)

    - Vince
     
  11. zonzo

    zonzo Registered

    Joined:
    Nov 12, 2006
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    Can somebody help me with this?
    My logs are now increasing each month. I want to turn off "keep stats logs... " in WHM.
    But I don't want that clients in Cpanel will not have archived logs.

    Are those settings overriding each other or what?

    In short: I want that client get a new log file each month & archived one for past month & I don't have too keep "Keep stats logs..." setting to ON in WHM.

    Sorry my english.
     
Loading...

Share This Page