and I went into server–>apache-server–>Existing virtual host tab, and I “removed” all the entries there, thinking I was following the advice from the forum suggestion. and now ALL of my virtual servers are not working.
is there some easy way to restore them? rebooting didn’t help nor did restarting apache
thanks for the suggestion, but no that does not seem to fix it, unfortunately.
this gets even weirder, about 2/3 of my domain names are showing the green “HTTP Server Test Page”
please keep the suggestions coming…
EDIT: if this helps at all, when I go back into the
Servers–>ApacheWebserver–>Existing virtual hosts tab, I now see two entries from where I tried your suggestion, however they specify the name “virtual server” under the "type rather than the domain name like they used to show (I think…)
one last dumb question before I cut my losses and go to bed…
i think some global setting that I set years ago has been changed. when I create a new virtual server, it looks totally different than it used to look in httpd.conf, and under “existing virtual hosts” it now has “virtual server” rather than the domain name.
since my brain has turned to mush, was there some global setting to have the domain name appear under Webmin—>Servers—>Existing virtual hosts tab??
all my webmin/virtualmin setup instructions are in one of my websites that is not coming up… DAMN…
EDIT - I seem to recall there was a setting to stick everything user /var/www/html or something like that, where I had everything under /home/
EDIT TWO: I am downloading all the screenshots I took when I set this up years ago to check the virtualmin creating settings
It sounds like you’re doing a lot of poking around in Webmin, which is not generally advisable for Virtualmin-created/managed users and virtual hosts. Your problems are in Virtualmin, you shouldn’t be deleting stuff out from under Virtualmin; Webmin should have warned you about editing stuff managed by Virtualmin.
When you find yourself in a hole, stop digging. So, stop moving more stuff around in Webmin to try to address problems on the Virtualmin side.
And, make backups before making any more changes. The best time to make backups was before things went bad, but since things seem to be going from bad to worse and you don’t have backups from before that started, maybe now is better than after it’s gotten worse.
There is no such setting in Virtualmin (you can choose any place to put things in Webmin, but, again, you’ve got to stop poking around in Webmin for your own mental well-being). /home is where Virtualmin users (for both virtual server/domain owner users, and email users) live. Don’t make things more complicated than they already are by trying to move everything around, too.
If you deleted your VirtualHosts in Webmin, that’s really quite a bad situation, and definitely not something we’d ever recommend. You can reasonably safely disable the Apache Website and Apache SSL Website Features in Virtualmin for a given domain, but that’s very different from deleting stuff in Webmin.
If you had your Virtualmin domains available in Virtualmin, you could go through and turn those features of and back on, to probably restore it. But, it looks like you also deleted your users? Maybe all of your domains? I’m not sure I understand what you’ve done to get to where you are. Without backups, if you’ve actually deleted everything, there is no good way to recover. You can “Import” from an Apache VirtualHost to create a Virtualmin domain user, or you can re-enable the Apache feature for a domain to recreate the Apache VirtualHost. But, with neither, we don’t have much to work with.
Do you have working etckeeper? You may be able to pull your httpd.conf out of that. And, you could restore your various other configuration files (like the various Webmin user and acl files and Virtualmin config).
Log in as root and check the following:
cd /etc
git status
If you see this:
On branch master
nothing to commit, working tree clean
You probably have backups of all of the config files that have been broken. (But, if you’ve deleted users and their homes/databases, you’re SOL.)
You can then do something like:
cd httpd/conf
git log -- httpd.conf
To see the commits to that file. You can get patches out of git log with the -p option, or you can revert to a specific commit.
Here’s some discussion of how to poke around in git history:
Anyway, I would strongly recommend before you do anything else, you back up. At least your /etc and your /home and any databases in /var. You can use that time to figure out if you’ve deleted your user homes somehow (if you have, you’re in a very bad place without backups of those homes), and if you still have system users (it sounds like from the errors you’re seeing about username already existing you do).
You need to stop and take some time to figure out what’s actually happening. We can help, but we need you to stop doing things and start looking at things. Look at the system user database (/etc/passwd, are you users still there?), look at the home directories (/home, are the user homes still there?), look at the database directory (/var/lib/mysql or /var/lib/mariadb, maybe, do you still have your user databases?). If you have all the data, getting Virtualmin to show it to you and treat it like a Virtualmin domain is not that big of a deal. You might lose some customizations/limits/etc. but if you have a system user with a home directory and files they own, you can bring it into Virtualmin without much drama. You may need to manually construct a basic VirtualHost in Apache to allow an Import into Virtualmin. It doesn’t need to be complicated or include everything for your websites, once you have your Virtualmin domains back, you can recreate a standard Virtualmin VirtualHost config by disabling and re-enabling the website features.