In Virtualmin, is there a big difference between Nginx and Apache?

SYSTEM INFORMATION
OS type and version Debian 12
Webmin version 7.9
Virtualmin version 2.105

Hello everyone, I would like to know if there is a big difference in Virtualmin in supported resources between Nginx and Apache 2.

I’ve been using Nginx in production for over 10 years and I’m used to it. However, I would like to know if there is a difference in Virtualmin in terms of supported resources and also if there is a big difference in performance between Nginx and Apache 2.

I will exemplify my use of Nginx for those who can see if Virtualmin works:
Nginx server + PHP FPM with support for different versions of PHP depending on the domain, subdomain or subfolder.

Currently I configure it directly in the settings and create the server_name to meet this demand.

What I hope for in this issue is support for being able to choose the PHP version through the Panel and also its settings, even directly in the configuration file.

Sometimes I use it for Proxy too, pointing a domain to an IP plus a port that runs a service like Ruby or Go for example.

I always use it with SSL support, in short basic use of a server.

Already in demand, we don’t have absurd demand, but I think it’s important to low RAM and CPU consumption to be able to scale better.

Grateful

Quick answer is No - But you obviously must install with the LEMP option.

$ /usr/bin/wget https://software.virtualmin.com/gpl/scripts/install.sh
$ sudo /bin/sh install.sh --bundle LEMP

Although I use Ubuntu OS I am pretty sure it works just as well with Debian OS.
I also use Nginx exclusively (I have a hate relationship with Apache) and have not yet found any serious insurmountable problem with the LEMP install, but am a little cautious with proxying. No problems with multiple versions of PHP either.

1 Like

Can this way of installing NGINX also be applied to AlmaLinux?
If so, what is the safe way to uninstall Apache and install NGINX on Virtualmin Pro?

Pretty sure it does for all “Class A” OS

you cannot have both Apache and Nginx on one VM. AFAIK, but then, why would you? You must install with the LEMP option. I don’t think uninstalling Apache then reinstalling Virtualmin is advisable. Remember Virtualmin must be installed on a clean OS.

Of course. It’s in the docs, and you’ll see the option if you run the install script with the --help option.

If you’re comfortable with and like nginx, just use nginx.

Apache with Virtualmin has more features, but that’s mostly because Apache has more features. nginx doesn’t directly support cgi (though we support use of fcgiwrap for running CGI scripts), it doesn’t support .htaccess files (and there’s nothing we can do about that).

There are no big differences from my perspective. Performance of both is fine. Apache is slightly larger, memory-wise, though if you strip it down to the same feature set as nginx it gets closer in size. But, if memory is at a premium, nginx will perform better. The web server hasn’t been the bottleneck in web service in a couple decades; they’re both much faster than any apps you run and won’t be the bottleneck. You can scale fine with either, the web server will not stop you.

That works in both Apache and nginx. php-fpm is the responsible server in the case of PHP, and the web server is just proxying to it. (Virtualmin hides most of the inner workings behind a friendly UI, but everything on the front end is merely a proxy in web app deployment these days.)

1 Like

Thank you very much Stegan and Joe for the answer, I really liked knowing that it will normally suit my use of Nginx with Virtualmin and if I want some more features I can still opt for Apache.

I should keep it in Nginx, as I already have stable configurations, I know more about its configurations and have been using it successfully for over 10 years.

About .htaccess it is really a strong factor for Apache, especially for those who want to host several clients on the server with the freedom to change some of the configurations.

My use at the moment is that I will control 100% of the configurations, so Nginx works well, but for those who intend to host clients that can install several applications and need more access to the configuration, Apache seems to be a great choice, so much so that hosting shares overall I see using Apache, even if they maybe put a Proxy in front and as Joe commented it is not the server that can be a bottleneck, but rather an application perhaps not as optimized or with high database usage, from my own experience the bottleneck It arrives at the Bank sooner, especially if it has not been optimized and has the correct index.

Joe then recommends updating the documentation on Nginx, I remember seeing one stating that it was not possible to choose the PHP version, perhaps it was referring to an old version of Virtualmin. I found it, it’s the legacy/archived one Using Nginx with Virtualmin | Virtualmin

The strength of Virtualmin (it is designed that way - to have clients + Manage Extra Admins (even resellers! with the PRO version)

1 Like

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