Changing the rotation periodicity for apache log files

Hi,

Now virtualmin stores the apache logs on

/var/log/virtualmin

This is usually not the same partition as /home so we don't have so much space.

How should we change the number of logs kept?

I see it could be changed on /etc/logrotate.conf but that could be overwritten by Virtualmin again. Is there an option for this on the web interface?

Many thanks Gustavo

Status: 
Closed (fixed)

Comments

You can reduce the rotation period by editing /etc/logrotate.conf and changing all occurrances of "weekly" to "daily" - Virtualmin won't over-write these. Also, you can change the period for new domains at System Settings -> Server Templates -> Default Settings -> Log file rotation, by entering a custom template for logrotate directives like :

        rotate 5
        daily
        compress
        postrotate
        /usr/sbin/apachectl graceful
        endscript

Thank you.

Unrelated to this: I'm not getting ticket follow ups on my email as before.

Automatically closed -- issue fixed for 2 weeks with no activity.

Where are the default settings for logrotate stored.. I'd like to change the default to daily for all created servers without using these override directives

You can edit the defaults at System Settings -> Server Templates -> Default Settings -> Log file rotation.

The text area appears to be blank .. There's an automatic radio that's selected .. How do I change the automatic setting?

You can work out the default settings by looking at the entry for a domain in your system's /etc/logrotate.conf file. The automatically generated directives will be something like :

rotate 5
weekly
compress
postrotate
/usr/sbin/apachectl graceful
endscript