Nginx and Apache confusion (tidying up)

Just a possible suggestion arising out of another topic

First I am assuming my understanding is correct:
Apache and Nginx webservers cannot co-exist on the same VM box

So why if we opt for Nginx do we still get options for Apache? Isn’t this just potentially confusing? It is not just “monitoring” but elsewhere.

And. Or a slight;y different subject (ok new topic) :exploding_head:

Yes they can see Run Apache, Nginx & HAProxy on Same Server (Debian, Ubuntu, CentOS).

1 Like

Well I didn’t know that and stand corrected.
But the introductory comment there sums it up well

“this isn’t always the best way because it has once caused weird problems that I cannot troubleshoot.”

and it seems to require addition of HAProxy and a lot of fiddling around. Perhaps not the ideal solution on a Virtualmin box. I would probably opt for a separate box if ever I wanted Apache. (unlikely)

I reverse that if ever I wanted nginx. (unlikely) :wink:

Thankfully Virtualmin makes it optional either way (even if it doesn’t always appear so).

They can coexist, but it’s a waste of resources to do so, and I don’t recommend it.

Virtualmin will only manage one of them in a nice way, though. You could use the relevant Webmin module to manage the “other one” (whichever one that is) or you could use Virtualmin Server Templates to automatically generate the necessary configuration files and changes. But, that would be a huge waste of time and energy for a thing that is silly for the vast majority of cases.

If you want to use Apache, use Apache. If you want to use nginx, use nginx. If you want to use both…eh…you probably have a poor understanding of the problem you’re trying to solve and the possible solutions available to you for solving that problem.

I’ll also mention that the thread you’ve linked was not an example of a system running both Apache and nginx.

If you have an Apache installation of Virtualmin, you will not see nginx options in Virtualmin, and likewise, if you use the nginx installation of Virtualmin, you will not see Apache related stuff in Virtualmin. At least, as far as I know, that’s the case. (You’ll certainly be able to find Apache mentioned in help files and when doing a search, though, on an nginx system. That’s not something we’re going to try to solve, I don’t think. I think people should know what web server they’re using. I think that’s a low bar for what we can expect users to know.)

But, Webmin (not Virtualmin) does not make this kind of distinction. The System and Server Status module (a Webmin module) has many monitor types. It does not hide monitor types just because a particular service is not installed locally. The System and Server Status module has a lot of different use cases. The way Virtualmin uses it is pretty limited and minimal. Someone might want to go well beyond that, if they have a lot of other infrastructure to monitor (including on other hosts, even). I don’t think we’ll be making Webmin modules more Virtualmin-aware. I think maybe we need to do a better job delineating between the two.

As long as you stay in the Virtualmin menu, you won’t find anything like this to confuse you…but if you go into Webmin, you’re going to find a general purpose system administration tool with a gazillion options, and basically no opinions about how anything should be done. Webmin is kinda like a thin GUI wrapper over ssh and a text editor, while Virtualmin is a system of components that do specific tasks in the easiest way we know how to do it.

Edit: And, we cannot and absolutely will not, try to prevent someone from making the hostname of their nginx system apache-server or vice versa. (Which is what is going on in the linked thread.)

I guess that is really what I wanted to hear - if it were fact but apparently not.

and obviously my confusion over Webmin vs Virtualmin. If they are so different (yet remain inter dependant) would it not be better to have them under a separate heading?



Sure. but that is everything Webmin and is where the confusion exists. Select Webmin and really you get a separate product most of which should come with a health warning (just how much of it is really needed from inside Virtualmin?)
They appear to be two separate products inextricably linked yet really unrelated.

Of course it could just be me not having been brought up on Webmin alone