BIG trouble

Hi guys I hope I find some guidance here!

We managed to uninstall both PHP and APACHE on our VPS by mistake:
We had more than 20 virtual servers active…I still can see them but they are not in the list of ‘existing virtual host’ Surely there is a way to automatically add them back? we have no access to the webpages…please help if possible. Thanx

Howdy,

Once you’ve reinstalled Apache, one way to regenerate the config entries for your domains is to go into Edit Virtual Server -> Enabled Features, and then uncheck and re-check the “Setup website for domain” feature (hitting “Save” after each).

Alternatively, you could also just restore a recent backup, and in “Features to restore”, set it so that it only restores the “Apache webserver configuration” feature.

-Eric

Thank you for the quick answer…we really need to be able to regenerate the config entries…our last backup was a week ago so being able to regenerate the entries would help.
We have tried what you said Eric but i couldn’t see the option '“Setup website for domain” please see screenshot

“Apache Website enabled” (and possibly “SSL website enabled”) would be the option that Eric was referring to. Uncheck this, save the virtual server, then re-edit, check it again and save, then Virtualmin will generate a new Apache config.

To do this for all servers at once, you can use the Virtualmin shell API; the commands for this would be:

root@server:~# virtualmin disable-feature --all-domains --web --ssl root@server:~# virtualmin enable-feature --all-domains --web

and then individually enable the SSL feature for those servers that need it.

Be aware though that these commands will have Virtualmin generate fresh new Apache configs; any changes that you might have made manually to the configs will be lost. Then again, I suppose currently they are lost anyway, so it won’t be doing any further harm. :wink:

thanx it worked,lodz of issues but it worked.