Move / Migrate Apache Sites to Nginx

OS type and version Ubuntu 20
Virtualmin version 7.5

I have Virtualmin with Apache cong. I want to move / migrate all my sites to Nginx.
Can I install Nginx on same server and configure all my sites one by one to Nginx ? If yes then how?
I can do this by taking backup, but I want to know the opinions of the users who already did this type of thing.

Edit : I installed Nginx but cant enable the service.

The reason you can’t enable Nginx could be that Apache is already running at port 80 and 443. Try stopping Apache2 and then starting Nginx.

You can actually make the switch on the same server with very little down time. Get all nginx sites-available files configured and linked to sites-enabled first. And then go on to stop Apache2 and start nginx.

It’s not as easy as it sounds. But it’ll work. And of course Virtualmin won’t detect any of your nginx sites. For that, I don’t think there’s an easy way, you need to rebuild the server and create domains one-by-one.

1 Like

try to stop apache first, then start nginx.
i’ve tried this, and my website running as well

1 Like

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