Backups fail on "no logging directive found in webserver configuration!"

Hi,

I have a problem with backing up virtual servers. It’s both on Ubuntu 12.04 en 14.04 using Virtualmin 4.18.gpl.

When backing up a server, it warns about:

 Copying Webalizer configuration files ..
.. no logging directive found in webserver configuration!

Copying Logrotate configuration ..
.. Error: no log rotation configuration found!

Last week I changed the logging in Apache and therefore changed Server Templates --> Apache website --> Directives and settings for new websites into:

ServerName ${DOM}
ServerAlias www.${DOM}
DocumentRoot ${HOME}/public_html
ErrorLog "|$/usr/bin/tee -a /var/log/virtualmin/${DOM}_error_log | /usr/bin/logger -t apache2 -p local1.error"
CustomLog "|$/usr/bin/tee -a /var/log/virtualmin/${DOM}_access_log | /usr/bin/logger -t apache2 -i -p local1.info" vhost_combined
ScriptAlias /cgi-bin/ ${HOME}/cgi-bin/
DirectoryIndex index.html index.htm index.php index.php4 index.php5
<Directory ${HOME}/public_html>
Options -Indexes +IncludesNOEXEC +SymLinksIfOwnerMatch
allow from all
AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch
</Directory>
<Directory ${HOME}/cgi-bin>
allow from all
AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch
</Directory>

In Server Templates I also made a custom template for logrotate:

/var/log/virtualmin/${DOM}_access_log /var/log/virtualmin/${DOM}_error_log {
        rotate 5
        weekly
        compress
        postrotate
        /usr/sbin/apache2ctl graceful ; sleep 5
        endscript
        sharedscripts
}

In existing sites I modified ErrorLog and CustomLog by hand into:

ErrorLog "|/usr/bin/tee -a /var/log/virtualmin/DOMAIN_error_log | /usr/bin/logger -t apache2 -p local1.error"
CustomLog "|/usr/bin/tee -a /var/log/virtualmin/DOMAIN_access_log | /usr/bin/logger -t apache2 -p local1.info" vhost_combined

Backing up of existing and newly created sited now all fail with the errors I mentioned above. Maybe someone has a suggestion of what to do now?

Thank you,
Alexander

Howdy,

Ah, it looks like Virtualmin isn’t able to parse that command to determine where the log files are located.

I’ll talk to Jamie, but I suspect there isn’t a good way to handle that.

In the meantime – if it’s causing the backups to fail, you could always choose the “Ignore errors” option in the backup options.

-Eric

Hi Eric,

Okay, no problem. I had already enabled “Ignore errors”, so the backups were made. I just tried to get rid of the error, maybe there was something I’d missed…

Thank you,
Alexander