I just upgraded Apache from version 2.0x to 2.2.6.
Seemed to go fine until I realized that the upgrade removed any trace of my Apache Virtual Host configs.
Ok, so I should have backed these up before I made the upgrade. I didn’t.
However… All my Virtual Virtual Servers are still there (which is how I originally set up the Apache Virtual Hosts).
So what I’m trying to do is to get VirtualMin to restore all the Apache Virtual Host config values in httpd.conf
Any advice appreciated.
No backups, huh?
You might be able to trick Virtualmin into doing it by changing some options in the Website options for the virtual server. I’m not sure that’ll do it though.
I’ll ask Jamie to chime in. But I’m thinking you’re going to wish you were keeping regular backups (we all make mistakes…it’s having backups that makes all the difference in how painful those mistakes are). Webmin and Virtualmin both have great backup facilities built right in.
In the end I found that I had made an automated backup of the whole system so found the file I was after - phew!
Would be good to know the answer re Virtualmin anyhow…
Cool. Thanks for the update.
The answer in Virtualmin, of course, is to use it’s Backup features religiously!
One thing that you could have done if you’d had no backups is to disable the website feature for all your domains, and then enable it again. This should tell Virtualmin to re-generate all the Apache config entries, although any domain-specific customizations to the configs would be lost.
I was going to suggest that too but didn’t know if it would delte the home directories, this is a good thing to know. I typically do that with DNS when I move domains around. It will then update all the slaves and the coding will be cohesive (providing you’re not doing any custom coding
Great job Jaimie & Joe
Thanks JOE! That indeed does work to restore httpd.conf when you accidentally overwrite it and you dont have a backup!