|
From: Doug R. <dro...@sm...> - 2006-03-26 20:00:09
|
On Tue, March 21, 2006 1:26 pm, Jamie Cameron wrote: > On 21/Mar/2006 02:39 Doug Robbins wrote .. > >> On Tue, March 21, 2006 2:59 am, Jamie Cameron wrote: >> >>> On Mon, 2006-03-20 at 16:57, Doug Robbins wrote: >>> >>> >>>> How do I configure the default logrotate options for new virtual >>>> servers? I've been through the Virtualmin module, the Apache module, >>>> >> and >>>> the Logrotate module, but can seem to figure it out. >>>> >>>> When I create a new virtual server, a logrotate entry for it's >>>> Apache >>>> logs is created in /etc/logrotate.d. That entry includes (for >>>> example) "rotate 5". The logrotate default is "rotate 4". So where >>>> are these specific virtual server options, like "rotate 5", coming >>>> from? >>> >>> Hi Doug, >>> These settings come from the server templates, which can be edited by >>> clicking on the Server Templates icon in Virtualmin, and then on the >>> Default Template link. On the page that appears is a section for the >>> logrotate directives.. >> >> Jamie, I can't see anything on that page referring to logrotate >> directives. Perhaps I'm going blind, but I've combed through it a dozen >> times now. >> >> To be clear, this is the page starting with "Template name... Skeleton >> directory for files..."? >> >> On which part of that page do you see logrotate options? >> > > It should be somewhere near the bottom.. > Which version of Virtualmin are you using there though? Apologies for the delayed reply... I using Virtual 2.610 with Webmin 1.260. And there's nowehere I can find to alter the logrotate settings. Even tried setting the skin back to the default, in case there was a problem there, but no joy. I did however finally solve the initial problem that led me to go looking for this configuration, which I'll record here in case it's useful for someone else.... I was getting regular logrotate errors, "unable to run postrotate scripts" for all virtual domains plus a few other logs. It seems that the logrotate program creates a temporary script in the system temp directory (/tmp) for any 'postrotate' directives in the logrotate configuration. An my /tmp is noexec, so the temp script(s) would fail. So I modified the /etc/cron.daily/logrotate script (on CentOS), adding a specific temp directory for the logrotate program to use: Was: /usr/sbin/logrotate /etc/logrotate.conf Modified to: env TMPDIR=/var/logrotatetmp /usr/sbin/logrotate /etc/logrotate.conf Then of course create the /var/logrotatetmp directory. Take care, Doug |