Share logrotate config with all domains... doesn't share.

I set “Share logrotate configuration with all domains?” to YES in server template (subserver is set "From Default)

And created a subserved and then a server, I’m expecting to see a single configuration in log rotate with subserver and server files “inside”, instead virtualmin created different configuration for each.

I misunderstood something?


I still creating servers or subserved and each of them have their own configuration… :frowning:

I really think that I misunderstood something in this HELP:

When this is set to No, Virtualmin will create a separate block in the logrotate configuration file for each virtual server. This allows each to have different settings, but will cause the web server to be restarted after the rotation of each domains’ logs - possibly interrupting service.
Selecting Yes will cause all new domains to share a single configuration block, which means the web server only has to be restarted once. However, it is not possible to have different rotation settings for each domain.

I was expecting from this that vhost’s logs rotate at the same time to not restart apache multiple times.

I found that if in an already created server or sub-server I disable the log rotation, “stand alone” configuration is correctly deleted and if I re-enable it the configuration this time is correctly shared!

Am I the only one that notice that?

I think so. :frowning:


I migrated all my domains to a new server and before doing so I had activated the option “share logrotate configuration with all domains?” This worked well and created a single logrotate configuration file domain.conf (the file took the name of one of the migrated domains) although it added a lot of “}” at the end of it, one for each log file it added.

Unfortunately, when I create a new virtual server instead of adding the log file to the existing logrotate configuration file it creates a new one.

unticking and re-ticking the LOG ROTATE features fix the issue as in my virtualmin installation?

Yes, it does. I dit it through the command line: virtualmin disable-feature --domain --logrotate and then virtualmin enable-feature --domain --logrotate. The log files for the virtual server are then included in the single logrotate conf file.

I helped a friend with a new virtualmin 6 installation and the it behave in the same way.
virtualservers have separated log rotation configuration even is the “Share logrotate configuration with all domains” is set to yes.