I am using Virtualmin Pro, and so far I like it a lot.
However I am now having a problem with backups.
I have installed nginx as front end to apache, therefore apache listens to the port 8080 while nginx to the port 80.
With this simple change, when I run a manual or scheduled backup, the backup fails and Virtualmin says:
Creating backup for virtual server vitobotta.com ..
Copying virtual server configuration ..
.. done
Backing up Cron jobs ..
.. none defined.
Copying Apache virtual host configuration ..
.. no Apache virtual host found!
Backing up Virtualmin settings (Module configuration, Server templates, Reseller accounts, New mailbox email messages, Custom fields, links and shells, Third-party script installers, Third-party content styles, Scheduled Virtualmin backups) ..
.. done
Backup failed! See the progress output above for the reason why.
Of course the virtual host files are there, and the websites are working (well, nothing is available live yet because I am still working on a blog and some other stuff).
If I only change the port from 8080 to 80 in the directives for the virtual hosts, then the backup proceeds as usual.
I’ve solved by changing the port from “Change IP Address”, in the settings of the virtual servers.
The backup is now working.
Where does Virtualmin stores this data? I thought it was only in the usual vhost files
Where does Virtualmin stores this data? I thought it was only in the usual vhost files :)
Virtualmin does keep some meta-data (unlike Webmin, which keeps very little) in /etc/webmin/virtual-server. The reason for this is that vhosts files don’t know anything about how everything interrelates. The vhosts file can’t tell Mongrel what ports to listen on or which vhosts belong to which user, the postfix main.cf can’t tell mailman which mailing lists belong with which virtual server, the MySQL configuration can’t tell an installed application which database to use, etc. Virtualmin does all of those things…so it keeps up with those associations in its own configuration files.
In general, you can make changes to the vhosts file or anything else on the underlying system and Virtualmin will respect them (certainly moreso than any other product or project in this space, since pretty much no other product actually understands the configuration files and instead just spits out predefined template-based crud). But those associations (like which VirtualHost sections belong with what virtual server) have to be kept up with outside of the system configuration files. The vhost file knows nothing about your backup schedule and who those backups should belong to.
I’m having a similar issue. I have a domain mydomain.com and the sub-server secure.mydomain.com. Since we are transmitting sensitive information, I commented out the VirtualHost in my httpd.conf file for the insecure site running on port 80 since I do not want it to be accessible, however I left the SSL enabled VirtualHost there. When I try to do a backup, I get an error saying “Copying Apache virtual host configuration …
The code you have there just gives me a server error. I don’t think you can mix HTML in the .htaccess file. At least I’ve never seen it like that. I have instead:
OK I know it’s been a while, but I got it figured out in case anyone else has the same problem in the future. It’s better to do the forwarding right in the VirtualHost of your httpd.conf file. I just added the following in the port 80 server that I want to be forwarded to https: