ISPConfig3 log rotation

Discussion in 'General' started by mislav, Jun 28, 2017.

  1. mislav

    mislav Member

    Hi there.
    How exactly can we change log rotation days? E.g. there are access logs under /var/log/ispconfig/httpd/sitename - which is the same as the ones in /var/www/sitename.tld/logs/ - those are rotated on daily basis and after X days they're removed - question is where can we change this number of days? This is somehow handled by ispconfig internally with its cronjob? I can't find anything in logrotate in etc, or neither in some cron.x folder in etc.
     
  2. michelangelo

    michelangelo Active Member

    The log file handling for each vhost is handled by the ISPConfig Cronjob that is executed at midnight.

    However, I had also the usecase that I had to touch those retention times. So I've commited a patch to ISPC with which it is possible to define the log retention for each vhost. If you already have ISPConfig >=3.1.3 running then you do already have the possibility to define the log retention for each vhost.

    This can be found in the options tab of the vhost.

    A value of 0 will skip the log purging completely for the vhost (which probably also is the fastest method to keep the log files forever).
    The default value is the usual ISPC default of 30 days.

    It's also possible to define retention times up to 9999 days which will probably never be reached, but my main intention for this patch was to have ability to define custom retention times, like very short like <7 days which are often demanded by public/government customers, or to skip the purging entirely.
     
    Jesse Norell and mislav like this.
  3. mislav

    mislav Member

    Cheers mate, thank you!
     

Share This Page