Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Feature Request: Backup of last working config files in sites-enabled #554
There should be a backup of the last known working config-files in the sites-enabled folder before creating the new config-files.
Reason: It happened sometimes that after changing the config of a domain (probably in the SSL part) the web server was not reachable because an error in a conf file.
Our configs are generated on-the-fly with current settings...we would need to log every change made to domains and settings between the cron-runs and even then, how would you access froxlor to revert to a known state if the webserver does not start? Easier said than done...the basic idea is reasonable and makes total sense...but it's not that easy.
Another approach would be to "move" the to-be-overwritten vhost-configs to a backup-location prior to re-generation every time. Danger here: if the cronjob runs again (ok, froxlor not working, no changes are possible, no re-generation but you can run it manually with --force to trigger it) you backup is being overwritten with non-working vhosts...
In addition to the second approach, you could easily write a simple bash script that does some kind of "vhost-config-backup" prior to a webserver-restart and place that as "webserver restart command" in the settings