Backup fails if no ServerAlias is defined

1 post / 0 new
#1 Thu, 05/05/2016 - 09:08
jlinkels

Backup fails if no ServerAlias is defined

When I try to back my servers from Virtualmin I get the infamous error message:

Copying Apache virtual host configuration .. .. no Apache virtual host found!

By eleminating all virtualhosts, configurations and whatnot it finally boiled down to this part:

NameVirtualHost *:80
<VirtualHost *:80>
    ServerName mail.example.com
    #ServerAlias example.com
    ServerAdmin webmaster@localhost
    DocumentRoot /var/www/html
</VirtualHost>

If I uncomment the ServerAlias the backup runs. If I comment the ServerAlias, the backup fails.

Why? I don't see the need for VirtualMin to make an issue out of what server alias I think is appropriate. Apache runs fine with or without the server alias.

Not sure whether or not VirtualMin has put the ServerAlias in the config file. Because the hostname is mail.example.com and I do not want to use mail.example.com as web site I had to edit this file. Maybe the ServerAlias was there. But that is not the problem. The problem is that Apache doesn't require it, and VirtualMin fails to perform a backup.

Debian 8 Virtualmin 1.791

jlinkels