Virtualmin does not seem to control httpd.conf anymore

hello –

i issued the following commands to try and clean up my horrible mess (long story I accidentally removed all the virtual servers in webmin)

dnf -y reinstall httpd ;
virtualmin config-system --include Apache

but now when I go into virtualmin and create a new virtual server, the new virtual server information is NOT being added to /etc/httpd/conf/httpd.conf

I expected to see something like this added:

Listen 80
<VirtualHost *:80>
    DocumentRoot "/home/example.com/public_html"
    ServerName www.example.com

    # Other directives here
</VirtualHost>

does anybody have a suggestion what I might try next?

SYSTEM INFORMATION
OS type and version 8.10 (Green Obsidian)"
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

out of sheer desperation, i went back into webmin–>Servers–>ApacheWebserver and tried to manually recreate one of the virtual servers I accidentally deleted, but that didn’t affect httpd.conf either.

Is such a thing even supported?
Supported OS

Read the post it’s rocky linux

2 Likes

Hmm… ok (that original post) was a bit of a saga, I had to give up after reading the bit about not taking a backup! :scream: :exploding_head:

I didn’t think it was applicable to RH variants but people disliked one huge axx file to manipulate. If something went wrong it was harder to maintain. In Debian the structure is for each website to have its own file under sites-enabled.

root@main:/etc/apache2# ls
apache2.conf    mods-enabled
conf-available  ports.conf
conf-enabled    sites-available
envvars         sites-enabled
magic           suexec
mods-available
root@main:/etc/apache2/sites-enabled# ls
xforge.com.conf
xlist.net.conf
xorge.com.conf
xlist.net.conf
xe.com.conf
xc.com.conf
xge.com.conf
xk.net.conf
xark.org.conf
x.etc

ok there is SOME activity with the httpd.conf file: whenever I go in and disable the virtual server Apache website I get the following lines written to the end of my /etc/httpd/conf/httpd.conf file:

<VirtualHost 162.220.165.228:80>
    ProxyPass /.well-known !
</VirtualHost>

I keep wondering if just reinstalling virtualmin is the way go…

On the current set up? Probably not. If you want to start from scratch, then it is a viable option. Virtualmin should ONLY be installed on a fresh OS . Installing it on an already configured system, even if it already has Virtualmin, is a disaster waiting to happen. Just way to much going on for a small team to try and test and bug fix with every new release.

Backups or starting over from scratch are the only real recovery modes. Period. End of.

wow - i wish i could thank you for that reply. intellectually, I am thanking you. emotionally, I am pissed off as hell. i KNOW you are right, unless Joe can salvage this.

So i checked the old thread, it is amazing how joe given this much time and still wiling to give more. @edwardsmarkf get backup of db, /home. then backup the vm/vps if possible.

connect with your hosting provider/or if you can clone the vps to a new vps to test.

You are making a lot of changes here and there, i still not get it how many edits you have made.

also if you can get a fresh vps and compare the setup if needed.

1 Like

ya joe is a saint for sure - not sure if this helps but I have made donations to webmin/virtualmin and I also have the premium package.

ahhh getting started on a NEW server… to say this wrecks the weekend is an understatement.

webmin/virtualmin is very powerful and comes with a responsibility. no one knows what steps you were taking and at what point it broke down and then what changes you made after it. if you have premium, get the backup to remote and local. get a clone copy of vps, sometime hosting provider can give a replicated vps. and then also get a new vps to review those changes. keep a log of each changes you made to revert back if needed.

Having a server in known condition will help you sleep better when all is said and done. :wink:

again, intellectually I totally and completely agree with you. but it still makes me sick.

there was another problem that started last night after I updated, the missing ‘system information’

That is a configurable option in Virtualmin. Virtualmin defaults to configuring things the way the OS configures things. We try to never surprise you.

EL distros, by default, put all the VirtualHosts in /etc/httpd/conf/httpd.conf.

Debian/Ubuntu distros, by default, put all the VirtualHosts in /etc/apache2/sites-available.

Either can be configured to behave the other way. But, I would generally recommend you do things that aren’t surprising, if you have other people also working on your servers. Surprises are bad.

1 Like

It is never the way to go on an existing production system.

If you want to install Virtualmin, do it on a freshly installed supported OS.

I think you should read my follow ups in your other thread.

Though I’m not sure how you got this out of Virtualmin:

<VirtualHost 162.220.165.228:80>
    ProxyPass /.well-known !
</VirtualHost>

Did you modify your Server Templates? I can’t figure out how you’d convince Virtualmin to do this unless you told it you wanted to control the whole VirtualHost and then deleted the config that would tell Virtualmin what to put in the VirtualHost in Server Templates.

I’ve covered how to probably troubleshoot that in your other thread, but I think you should focus on the more pressing problems and let this one sort itself out later. Seeing System Information is not a critical function. Get critical functions figured out first. (And, I suspect this problem has to do with removing the TLS certs out from under Webmin.)

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.