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.

FreeBSD log rotation

Discussion in 'General Discussion' started by svwh-mike, Feb 20, 2007.

  1. svwh-mike

    svwh-mike Registered
    PartnerNOC

    Joined:
    Nov 12, 2006
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    Hello,

    Can someone point me to a tutorial regarding how cPanel rotates domain logs for a FreeBSD machine?

    I am having a client who's logs are growing very fast over the course of a week and I found that cPanel is not rotating his domain logs at all. Someone has a hack in cron to clear the logs once per day but this seems excessive to me, plus it breaks the stats :-(

    Any help would be appreciated, on my linux boxes I use this script
    Code:
    /usr/local/apache/logs/*log {
       rotate 2
        missingok
        notifempty
        sharedscripts
        postrotate
            /bin/kill -HUP `cat /usr/local/apache/log/httpd.pid 2>/dev/null` 2> /dev
    /null || true
        endscript
    }
    
    /usr/local/apache/domlogs/*log {
       rotate 2
        missingok
        notifempty
        sharedscripts
        postrotate
            /bin/kill -HUP `cat /usr/local/apache/log/httpd.pid 2>/dev/null` 2> /dev
    /null || true endscript
    }
    
    /usr/local/apache/logs/*com {
       rotate 2
        missingok
        notifempty
        sharedscripts
        postrotate
            /bin/kill -HUP `cat /usr/local/apache/log/httpd.pid 2>/dev/null` 2> /dev
    /null || true
    }
    
    /usr/local/apache/domlogs/*com {
       rotate 2
        missingok
        notifempty
        sharedscripts
        postrotate
            /bin/kill -HUP `cat /usr/local/apache/log/httpd.pid 2>/dev/null` 2> /dev
    /null || true endscript
    }
    
        endscript
    But I'm not finding anything similar for FreeBSD.

    Thanks a lot!
     
  2. easyhoster1

    easyhoster1 Well-Known Member

    Joined:
    Sep 25, 2003
    Messages:
    659
    Likes Received:
    0
    Trophy Points:
    16
    Take a look at the newsyslog.conf in /etc


    should help
     
    #2 easyhoster1, Feb 21, 2007
    Last edited: Feb 22, 2007
Loading...

Share This Page