For some domains on a Virtualmin server, log file rotation and enabling / disabling is problematic

On a large Virtualmin server, for some domains, you might encounter the following issue when enabling and disabling log rotation using the command line. The bottom line here is when disabling the feature, it reports no log rotation configuration . Then, when enabling it again, it reports already enabled. See my dilemma?

Example Problem

Disabling it:

root@server:/root# virtualmin disable-feature --logrotate --domain
Updating server ..
Updating Webmin user ..
.. done

Disabling log file rotation ..
.. Error: no log rotation configuration found for $1

.. done

Re-loading Webmin ..
.. done

Then when you enable it again:

root@server:/root# virtualmin enable-feature --logrotate --domain
Updating server ..
Setting up log file rotation ..
.. already enabled for log file /var/log/virtualmin/example.com_access_log

Updating Webmin user ..
.. done

.. done

Re-loading Webmin ..
.. done

How to Troubleshoot

Virtualmin uses the standard log rotation daemon. The configuration file is /etc/logrotate.conf In there you’ll find the usual include setup:

# packages drop log rotation information into this directory
include /etc/logrotate.d

Next track down that folder, and in there you’ll find virtualmin.conf

The best is to:

  1. Make a backup of the file
  2. Manually fiddle with the file

Why is this happening?

The most likely cause is the Perl script that interprets that file is encountering a hiccup so best to fix it by hand.


Also refer to file

/etc/webmin/virtual-server/domains/ where log rotation= parameters are stored.


Share this article

Leave a Reply

Your email address will not be published. Required fields are marked *

Scroll to Top