Crap, really screwed something up, all my virtualmin servers are GONE - sorta emergency here

hello -

i was trying to address this problem: " The feature Administration user cannot be disabled"

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

suggestions please… i need to go to bed soon…

SYSTEM INFORMATION
OS type and version rocky linux 8.10
Webmin version 2.202
Virtualmin version Version 7.30.4 Pro, master admin mode
Webserver version Server version: Apache/2.4.37 (Rocky Linux)
Server built: Aug 12 2024 08:13:30
Related packages SUGGESTED

Try this:

Go to the least important of all your virtual servers and Edit Virtual Server - uncheck the box for Apache / Nginx website. Save.

Then check the box again. Save.

Has the domain associated with the virtual server started working? If so, you know what to do for the rest of the domains.

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… :worried:

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…)

I can’t see anyone suggesting you do that, thats just crazy.
Joe suggested

Meaning edit virtual server and disabling and enabling apache to re-do the setting. It may fix your issue although I see you tried that.

Can you show the response when you do that,

any errors

first off, THANK YOU EVERYBODY - i feel like I am in just thrashing mode…

it appears that my ‘/etc/httpd/conf/httpd.conf’ contents has all been removed.

does virtualmin/webmin possibly save this file anywhere before changes are made?

EDIT - there are a dozen virtual servers, maybe easier just to recreate them all. however, I get this message now:

Failed to create virtual server : A free automatically chosen administration username could not be found (both XXXXX and XXXX.com already exist)

is virtualmin saving the user names somewhere?

Have you ever created a backup?

not of httpd.conf… :thinking: DAMN IT…

with virtualmin?

no… this is damn embarrassing :astonished::astonished::astonished:

still thinking easiest is just to recreate the servers… but I keep getting the “user exists” error.

EDIT: I don’t understand this error:

Failed to create virtual server : A free automatically chosen administration username could not be found (both XXXXX and XXXX.com already exist)

is virtualmin storing these user names somewhere? because I sure cannot figure out where.

i am not seeing ANY names under Virtualmin–>Edit Users tab

Webmin has users and groups, you prob have the user in there.

Webmin has users and groups, you prob have the user in there.

all I have in there is ‘root’

I keep thinking there is some users table somewhere, like in a MariaDB database but I cant find it…:angry::angry::angry:

That not possible, linux would crash. I’m not talking about webmin users, but system users.

i am starting to wonder if i am going to need to reinstall webmin/virtualmin…

yeah looks like a mess.
under system

ha ha - ok i was looking in the WRONG PLACE… damn idiot I am…

stay tuned pls…

ok found the names, deleted…

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

I don’t have that term
here you mean

yeah the virtual servers should all be under home.

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.

1 Like

i thihnk we are down to one last error - when I tried to recreate a domain name, this comes up when I try to pull up the page - suggestions?