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 Rotate Certain Domain Logs

Discussion in 'General Discussion' started by caldwell, Apr 23, 2010.

  1. caldwell

    caldwell Member

    Joined:
    Sep 10, 2008
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    We have certain system domains which we would like to keep access_logs for indefinitely or at least rotate them on a multi-month schedule with older months gzipped.

    I cannot figure out how to do do this or work around this in CPanel.

    We've had to tell CPanel to keep ALL domain logs currently due to not knowing how to accomplish this. This means that everyone's access_log files have been growing and growing. This, of course, slows down stats processing and the like, as well as increasing disk space exponentially.

    If we have userA, userB and userC, can someone give some pointers on how to accomplish the following:

    userA = normal customer, rotate logs monthly, don't keep archives
    userB = system account, rotate logs monthly and keep a gzip archive either in the home directory or system log directory
    userC = system account, allow log file to grow until we process it manually

    At the very least, I would like to do the above for userA and userB.

    Help!?!?!?!?
     
  2. khiltd

    khiltd Member

    Joined:
    Apr 18, 2010
    Messages:
    13
    Likes Received:
    0
    Trophy Points:
    1
    Put said domain's logs in a different location and configure logrotate (or whatever is standard on your OS) to handle them instead of cPanel. The OS usually does a much better job of it anyway.
     
Loading...

Share This Page