Bulk disable apache/enable nginx

Hey, guys, I'm moving to nginx now, and will be very good to rethink the way of enabling/disabling apache/nginx. Currently, after importing from cpanel I have a structure like this:

  • maindomain
    • parkeddomain1.maindomain
      • parkeddomain1
    • subdomain
    • parkeddomain2.maindomain
      • parkeddomain2.maindomain

I want to switch to nginx, and I have to manually disable apache for every entry in this list. The operation should be repeated over 60 times, but I actually have 5-6 parked domains and several subdomains.

Will be good to have a way to bulk disable apache/enable nginx, The issue may be related to other options as well, I'm not sure.

Thanks, Ruben



Howdy -- instructions for switching from Apache2 to Nginx are here:


Note that in there, it mentions that it's really designed for setup when there are no existing domains, and they are being created from scratch.

Not everything will be setup properly if attempting to migrate from Apache2 to Nginx.

However, if you wish to do that anyhow, you can use the command line API to mass-disable and mass-enable features. You can use the "enable-feature" and "disable-feature" parameters when running the "virtualmin" command.

Hi, andreychek!

Thank you very much for anwser. I wish I saw that several hours ago :( Will be good just add a hint on web interface to give clues how to do bulk updates, that was not obvious for me.

For the future, I know the source of power now :D

We can mark this issue as closed.

Thanks, Ruben

It looks like you may be using Virtualmin GPL there, and I don't believe this feature is available on the GPL version.

However, features can be mass enabled and disabled in the GPL version using the "List Virtual Servers" option on the bottom-left.

Yes, I'm using Virtualmin GPL, and I did:

virtualmin enable-feature --virtualmin-nginx --all-domains 

It worked like a charm. Will be good to have an option to exclude some domains there, so people will not be forced to extract domains, edit the list and tail with cat/awk.

For "List Virtual Servers" I'm not sure. It opens the same list we have in drop-down on top left corner, and when clicking top-level domain, it opens exactly the same page as if I've selected it from drop-down list. There is "Module config" above the list, but there is nothing relevant. The closest field is: "Features to deactivate when disabling", and apache/nginx are not listed as well.