Alternative web server support, virtualmin-nginx and virtualmin-nginx-ssl

Howdy all,

When Virtualmin virtual-server 3.89 rolled out, it introduced a major change in how web services are setup. They’re now modularized in the same way as MTAs and databases. So, adding support for a new web server simply involves creating a new module (or multiple modules, as the case may be), and should require little or no changes to the core Virtualmin codebase.

The first such module (and probably the only one that will be developed by Virtualmin, Inc., for the foreseeable future) is for nginx, a high performance and lightweight web server suitable for very low memory environments. This support is available for both Virtualmin Professional and Virtualmin GPL.

There’s some documentation for nginx support in Virtualmin here:

Conversions of existing production systems to nginx are not yet supported (and it will not be coming any time soon, due to the complexity of, and occasional impossibility of, translating Apache configuration to nginx configuration), so you’ll need to start with a fresh system and new domains. Restoration of backed up Apache virtual servers on nginx systems, and vice versa, will be supported in the coming months (with some limitations), but it is not yet supported.

We still recommend you use Apache, unless you have very good reasons to choose nginx. “My web app is too slow” is probably not a good reason to choose nginx, because unless memory use is your primary bottleneck, your app will probably still be too slow on nginx. The web server is almost never the primary cause of website slowness.

But, if you’re on a very low-memory system with only a few sites and none of your applications require CGI, you may find nginx is a useful compromise. Or, if you serve high volume static content, nginx may be right for you.

One final note: nginx support should be considered beta. It has only been deployed by a few dozen (maybe a few hundred now) people, and mostly in testing environments. There are definitely more undiscovered bugs and misfeatures in nginx support than in Apache support (which has had 8+ years of battle-hardening on hundreds of thousands of servers).

As always, if you find any bugs, let us know in the ticket tracker!