Additions to logrotate.conf

4 posts / 0 new
Last post
#1 Sun, 10/23/2011 - 04:05

Additions to logrotate.conf

Where can I modify the default entries that get added to /etc/logrotate.conf when a new virtual host is created in Virtualmin?

I need to change the automatically added:

/etc/rc.d/init.d/httpd restart ; sleep 5


/usr/sbin/apachectl graceful

Sun, 10/23/2011 - 04:35

A while ago I had to regularly kill and start apache because of the new entry made after creating a virtual server. All my old virtual host entries were with 'graceful'.

From what I remember, I did a search for logrotate within the webmin interface, saw this logrotate entry that was different to the others, and changed it in relation to the new virtual host.

Didn't have to kill and start apache again after that.

Mon, 10/24/2011 - 09:40


While I don't remember for certain off the top of my head -- I think the value you're trying to tweak is what Webmin has setup as the "Apache restart command".

That can be tweaked in Webmin -> Servers -> Apache -> Module Config -> Command to apply configuration, and you can change that to your preferred command to use to restart Apache.

Once you do that, I think all new log rotate entries would be added using that command.

As far as existing entries go -- cyrus is right, you'd need to edit your log rotate entries for that to work.

You can either manually edit the config in /etc/logrotate.conf, or you can go into Webmin -> System -> Log file rotation.


Mon, 10/24/2011 - 17:12

Thanks Eric!

I have been manually editing /etc/logrotate.conf for about a year so finally found time to ask how to fix.

The default method was leaving processes using port 80 that stopped the restart from working leaving apache dead. The /usr/sbin/apachectl graceful in logrotate.conf I found fixed it.