How to configure logrotate to rotate apache?

xisip

New member
Joined
May 25, 2017
Messages
5
How to configure logrotate to maintain configuration files for a month?

Now in /etc/logrotate.d/apache I have the following configuration:
Code:
/var/log/httpd/access_log /var/log/httpd/agent_log /var/log/httpd/error_log /var/log/httpd/referer_log /var/log/httpd/suexec_log /var/log/suphp.log /var/log/httpd/sulsphp_log /var/log/httpd/ssl_request_log /var/log/httpd/modsec_audit.log /var/log/httpd/modsec_debug.log /var/log/httpd/domains/*.log {
    weekly
    missingok
    rotate 8
    compress
    delaycompress
    notifempty
    sharedscripts
    postrotate
        /bin/kill -HUP `cat /var/run/httpd.pid 2>/dev/null` 2> /dev/null || true
    endscript
}

But I see daily log rotation in /var/logs/httpd/domains/*domain.log :confused:

I tried to put a link to the:
Code:
ln -s /etc/logrotate.d/apache /usr/local/directadmin/data/templates/custom/apache.logrotate

But in the readme it is specified that such a file cannot be overridden!

How can I solve this problem?
 
Back
Top