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!

Archive logs after awstats run

Discussion in 'cPanel Developers' started by _El_Chojin_, Aug 30, 2009.

  1. _El_Chojin_

    _El_Chojin_ Member

    May 22, 2009
    Likes Received:
    Trophy Points:
    On WHM you can configure that afer stats run, delete domlog of the domain, this is good to dont get out of disk space, the problem is that on my country you need to save access log of apache for some months by law.

    What i would like is to move it to another folder.

    At this time i have a script that copy al logs at midnight, and the problem is that stats only have access log from midnight to the time that is executed so, only few hours, so what i'm trying to do is to move the log after is processed by awstats (i only use this stats program) to another folder, and my scipt could copy after.

    I have opened a ticket with cpanel support but they dont support this things, but said me where i need to start customizing and is:

    /usr/local/cpanel/Cpanel/ in function "dologs", around line 424.

    Anyone could help me.

  2. sirdopes

    sirdopes Well-Known Member PartnerNOC

    Sep 25, 2007
    Likes Received:
    Trophy Points:
    Cpanel already has an option built in to save the logs. It creates a folder called log or logs in your home directory where it stores the apache domlogs in a compressed file. You can enable this by clicking on raw access logs and then:

    Archive Logs in your home directory at the end of each stats run

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