Nginx 404 + system not ready + reverse proxies with Apache + multiple domains + php-fpm

SYSTEM INFORMATION
OS type and version Almalinux 9
Virtualmin version Webmin 2.105

So I’m sure this is a total noob question but I’ve been losing my mind on it for two days now. I’ve used Webmin extensively in the past and I love it, but I’ve always been intimidated by Virtualmin. I regrettably finally decided to give it a shot.

My exact same configuration that works on an identical VPS does not work here. The only difference is Virtualmin. I even managed to make Apache work after losing half my hair, but not Nginx.

Also, what’s up with my configurations not applying? Why is Virtualmin holding my hardware hostage? I’m now forced to do everything through it? That’s ridiculous. Sure, it makes certain tasks easier, but other tasks are still easier to do in other ways. Webmin was never this possessive of me.

I’ve configured Nginx outside of Virtualmin. I’ve configured Nginx inside of Virtualmin. I did it one way and modified the config the other way. Nothing works. Nothing has any effect. And this stupid configuration check thing won’t go away even though it says everything is fine.

The status of your system is being checked to ensure that all enabled features are available and properly configured …

Your system has 1.67 GiB of memory, which is at or above the Virtualmin recommended minimum of 256 MiB

BIND DNS server is installed

Mail server Postfix is installed and configured

Postfix is configured to support per-domain outgoing IP addresses

The following PHP execution modes are available : fcgid fpm

The following PHP versions are available : 8.1.14 (/bin/php-cgi)

The following PHP-FPM versions are available : 8.1.14 (php-fpm)

PHP versions have changed to 8.1 since last check. Regenerating any missing php.ini files

MariaDB 10.5.22 is installed and running

Logrotate is installed

Plugin Nginx website is installed

Plugin Nginx SSL website is installed

Using network interface eth0 for virtual IPs

IPv6 addresses are available, using interface eth0

Default IPv4 address for virtual servers is XXXXXX

Default IPv6 address for virtual servers is XXXXXX

Quotas are not enabled on the filesystem / which contains home directories under /home and email files under /home. Quota editing has been disabled

All commands needed to create and restore backups are installed

The selected package management and update systems are installed

Chroot jails are available

The feature Apache website cannot be disabled, as it is used by the following virtual servers : domain1 domain2

… your system is not ready for use by Virtualmin

What am I doing wrong? My SSL is all in order, my vhosts are all in order, my PHP config is in order. I’m at a total loss. It’s almost like Virtualmin is cockblocking everything I try to do unless I do it “the approved way”.

P.S I even set up a reverse proxy for webmin under a subdomain and linked it to its own SSL certs and that’s also 404ing.

Would it help to delete my virtual servers so Virtualmin stops interfering with my configs and do everything manually? Or would that make things worse?

How did you install virtualmin, is this a virtualmin modules install onto webmin?
Virtualmin install via scripts (prob the best way to install virtualmin) should be done on a clean os with nothing pre-installed.

https://www.virtualmin.com/download/

Yes I know. That is how I installed Virtualmin. On a clean OS blablabla

Did you read my post?

Also this just happened.

Did you. To me that wasn’t clear.
Did you use the LEMP option “Use the --bundle LEMP option for Nginx.”
You mention Apache and configuration Nginx outside of Virtualmin, that sounds like your issue.
The scripts installs the system correctly for you.
Virtualmin dosn’t hold any hardware hostage, no idea what you mean.

https://www.virtualmin.com/documentation/installation/automated/

LAMP (Apache) vs. LEMP (nginx)

The Virtualmin install script can setup Apache or Nginx. The default, and best-tested and most feature-complete, is Apache. But, if you prefer Nginx, you can install a bundle with the LEMP stack instead of the LAMP stack. Use the --bundle LEMP option for Nginx.

I installed LAMP. Then I installed Nginx. Because I want to use both. Neither worked at first, but since I have more experience with Apache I was able to make it work, but not Nginx.

As far as I’m aware, Virtualmin doesn’t configure anything for you automatically, so I’m not sure what you mean. My whole problem is that it’s not letting ME configure anything because it wants me to do everything through it.

That’s what my issue is. Please don’t insult me by ignoring everything I say then trying to tell me what my issue is. I clearly stated what my issue is repeatedly. That’s my issue. Not anything else.

I don’t think you can use both, its either Apache or Nginx.

Then the solution is, as I had guessed previously, to remove this abomination from my hardware.

Thank you for your help.

The install script does setup the system Automatically. Once you finish install you can start creating virtual servers and hosting works.
I’ll leave it at that as you seem to be a cranky person.

Bro. I’m not cranky, but my patience with people like you is nonexistent.

Had you read my very first post, I was in a lovely playful mode. I painstakingly explained that I have successfully installed Virtualmin days ago and have been trying to configure it ever since. I have dozens of virtual servers configured.

You didn’t even bother to look at the damn check config thing I quoted. Does that seem like an unfinished installation to you? Jesus christ man. Basic human decency is to read before wasting everyone’s time with ignorant responses. Have some respect.

No prob, have a great life.

If nothing else, you did bring my attention to the fact that Nginx + Apache support isn’t included like I had been taking for granted.

I found this discussion here, for those who come across this post in the future, where Virtualmin staff voice the opinion that running both is unnecessary and will therefore never be supported.

I mainly wanted both for the flexibility, so I can use whichever works best for any given scenario. The performance and security benefits are just a bonus.

I get not being able to configure both simultaneously through Virtualmin, but why block my manual configurations too? That doesn’t make any sense.

What makes you believe we’re blocking your manual configuration? (We are not. Anything you want to do manually you can do.)

In a manner of speaking. In practice, what Virtualmin seems to do is override all other configurations in a very sneaky way. It uses obfuscated paths and filenames to make it impossible to get the upper hand.

I’ve been fighting it since yesterday. My manual changes aren’t reflected in Virtualmin which tells me it’s using a different set of “official” config files, and the Virtualmin official config files that I was able to find and modify were ultimately re-overwritten by other more obfuscated parts of the official config that I wasn’t able to find.

My bad, I didn’t read posts subject fully. I stick to the basic apache install and should not have responded at all.

1 Like

I don’t know what software you’re looking at, but it isn’t Virtualmin.

Virtualmin uses the packages provided by your OS, and puts almost everything in the places your OS puts them (e.g. VirtualHost config goes in /etc/apache2/sites-available on Debian/Ubuntu, vs. /etc/httpd/conf/httpd.conf on EL).

Your distro made those decisions, and you chose a distribution.

Ah, this might be that Ubuntu/REHL incompatibility then

I also don’t know what you’re doing, but Virtualmin almost always parses and respects existing configuration, as long as you do that configuration after Virtualmin is installed (the installer does not try to preserve anything, and expects a freshly installed OS).

I’m just getting a wild amount of hostility from you that I don’t understand that seem to be based on incorrect interpretation of what’s happening on your system. We aren’t some cabal trying to ruin your day, we’re making almost entirely free software that’s in use on a hundred thousand or so systems, mostly working pretty well for most of those folks. Nobody’s claiming Virtualmin is perfect, but your takeaway doesn’t even make sense to me. I don’t know how you can assume Open Source software could be “sneaky” or “obfuscated”. You can look at our github! You can see every decision we’ve ever made in our commit history.

But no, it’s more than that. I never had any of these issues with Webmin. Virtualmin has SEVERAL php.ini files, for example, including in every public_html directory. That’s not normal.

And speaking of the public_html directory, WHY? Why does my htdocs directory NEED to be called public_html? It took me hours to convince Virtualmin to reduce it to just “public” even though I’d rather just have a normal directory name. But that pales in comparison to my other issues.

Apache and Nginx vhosts that I create in Virtualmin don’t create new .conf files under Apache/Nginx directories, or anywhere else that I could find either. That’s really the core of my issue.