Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

How to Rotate Certain Domain Logs

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

  1. caldwell

    caldwell Member

    Sep 10, 2008
    Likes Received:
    Trophy Points:
    cPanel Access Level:
    Root Administrator
    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.

  2. khiltd

    khiltd Member

    Apr 18, 2010
    Likes Received:
    Trophy Points:
    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.

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice