Issues Disabling Apache After Failed Installation on Virtualmin

I did miss read

Apologies, I misread your message. You’re right, I probably just need to uninstall the Apache package. I misunderstood the meaning and symbols in the text, like the period (.) … I’ve already uninstalled Apache and all its related packages, but it’s still showing as if it’s in use. Any suggestions on how to fix that?

Package 'apache2' is not installed, so not removed
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Package 'apache' is not installed, so not removed
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.


Should be listed here right?

Yes

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

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

Mail server Postfix is installed and configured

Postfix is configured to support per-domain outgoing IP addresses

The following CGI script execution modes are available : fcgiwrap

The following PHP execution modes are available : fcgid fpm

The following PHP versions are available : 8.2.24 (/bin/php-cgi8.2)

The following PHP-FPM versions are available : 8.2.24 (php8.2-fpm)

MariaDB 10.11.6 is installed and running

Logrotate is installed

SpamAssassin and Procmail are installed and configured for use

ClamAV is installed and assumed to be running

Plugin AWStats reporting is installed

Plugin Nginx website is installed

Plugin Nginx SSL website is installed

Using network interface enp5s0 for virtual IPs

Default IPv4 address for virtual servers is Meh

Detected external IPv4 address is Meh

Both user and group quotas are enabled for home and email directories

All commands needed to create and restore backups are installed

The selected package management and update systems are installed

Chroot jails are available

**.. your system is ready for use by Virtualmin**


also listed here unchecked but still, and if it should not coexist with NGINX why is it shown at all?

As has been mentioned history and probably most folk expect it. As long as it is not checked and if you need a webserver either or nginx or apache is checked

so I am in the clear then?

Apache support is built-in. It can’t be removed from Virtualmin (at least not without a bunch of code changes). nginx is a plugin. nginx support can be removed by removing a couple packages, Apache support cannot. But, if it’s disabled, it’s not doing anything.

It is maybe bug-like that selecting nginx and de-selecting Apache doesn’t make Virtualmin use nginx. But, maybe you were misinterpreting what you were seeing before and it was actually already doing the right thing? Was the reason you thought it wasn’t right just because you saw Apache in Featurs and Plugins or was Virtualmin actually still trying to make changes in the Apache configuration instead of nginx and showing the status of Apache rather than nginx service? I’m trying to figure out if there’s something we need to fix, or merely something we ought to try to document better.

Yes I can say THAT is the same reason that GOTCHA me!
Having made the decision to install via the LEMP option and then seeing Apache is disconcerting (especially to someone who detests Apache) but after a while one gets used to it as a quirk.

given the number of times this question (can we install both webservers) seems to pop up perhaps it could be better handled/displayed? Documentation - perhaps (but who reads that? when? - would it be simpler just to not show Apache in the list when the alternative has been selected?

So, yeah, I did read the full documentation, but knowing that Nginx and Apache can technically coexist (with enough duct tape and optimism—like this guide suggests: https://hostadvice.com/how-to/web-hosting/ubuntu/how-to-configure-nginx-and-apache-together-in-ubuntu/), I thought, “Why not give it a shot?”

Then I saw that tempting “install as a module” button and—without hesitation—smashed it like it was a game show buzzer. My brain went, “Ooh, a button! Must be safe, right?”

Fast forward, and now I’ve got a circus of problems. For instance, when I add a new virtual subserver with correct-domain.com , everything before .incorrect-other-domain.com (so randomstuff.incorrect-other-domain.com) happily redirects to the new subserver’s index page, like it’s the cool new hangout spot.

Email seems terrible too now…

So, here I am, proud owner of a FUBAR server. Looks like a fresh reinstall is in my near future… maybe after a quick break to clear my head.

Quick question: It looks like I have a backup from before all of this happened. If I select Virtualmin configuration settings for restoration, does that mean it will fix the mistake I made?

If yes, that would be the quickest and most efficient way to fix my ID10T error. If not, it’s going to take a whiiiile…

Wow! If you have a backup from “before”… that’s GREAT! But, doing a Virtualmin “restore” wouldn’t be enough to solve all the “apache+nginx package mess”. You would need to move your backup to a safe location and reinstall the server from scratch – then install Virtualmin – then restore your backup.

1 Like

Okay that’s clear =) will do thanks!
luckily I do store them on

  1. Separate internal drive.
  2. File server.
  3. External drive.

Well, I’ve written down every single step I need to follow for the reinstall. Here goes nothing! Let’s get started. I’ll keep you all updated. Thanks for all the explanations and your precious time you’ve given me so far!

Alright, folks, I’ve got a squeaky clean LEMP setup! Now, I could totally go ahead and install Apache again by diving into the unused modules and smashing that install button… but hey, I’m not that crazy. Just kidding, haha!

So, now I’m restoring the backup, but buckle up—it might take a while since my webshop is a casual 180 GB. Yeah, apparently I run an online universe. :sweat_smile:

I’ve hit the restore button and, of course, I’ve doused my Mac with coffee (because that’s obviously how you keep a machine awake, right? open a terminal window and pour a fine blend of caffeinate over it ). Meanwhile, I’m off to do some adulting—groceries, because, well, food and coffee is important, I hear.

So, wish me luck, and if you hear the distant sound of sobbing, that’s just me watching the progress move at the speed of a snail in a marathon or maybe the flu, maybe both.

At least I’ve written myself an installation guide, so if I ever need to reinstall again, it’ll just be a simple case of copy-paste. Future me will thank current me for the foresight… or laugh at my overconfidence.

So, I’m mostly back online, only to find that Dovecot has decided to throw a tantrum and refuses to start after the restoration.

 systemd[1]: Starting dovecot.service - Dovecot IMAP/POP3 email server...
somedomain.com dovecot[48989]: doveconf: Fatal: Error in configuration file /etc/dovecot/dovecot.conf line 192: ssl_cert: Can't open file /etc/ssl/virtualmin/1728425052178431/ssl.combined: No such file or directory
Oct 14 15:28:45 systemd[1]: dovecot.service: Main process exited, code=exited, status=89/n/a
× dovecot.service - Dovecot IMAP/POP3 email server
     Loaded: loaded (/lib/systemd/system/dovecot.service; enabled; preset: enabled)
     Active: failed (Result: exit-code) since Mon 2024-10-14 15:28:45 CEST; 17s ago
   Duration: 1h 58min 38.786s
       Docs: man:dovecot(1)
             https://doc.dovecot.org/
    Process: 48989 ExecStart=/usr/sbin/dovecot -F (code=exited, status=89)
   Main PID: 48989 (code=exited, status=89)
        CPU: 15ms

Oct 14 15:28:45 systemd[1]: Starting dovecot.service - Dovecot IMAP/POP3 email server...
Oct 14 15:28:45 dovecot[48989]: doveconf: Fatal: Error in configuration file /etc/dovecot/dovecot.conf line 192: ssl_cert: Can't open file /etc/ssl/virtualmin/1728425052178431/ssl.combined: No such file or directory
Oct 14 15:28:45 systemd[1]: dovecot.service: Main process exited, code=exited, status=89/n/a
Oct 14 15:28:45 systemd[1]: dovecot.service: Failed with result 'exit-code'.
Oct 14 15:28:45 systemd[1]: Failed to start dovecot.service - Dovecot IMAP/POP3 email server.

Apparently, it’s looking for an SSL certificate file that doesn’t exist anymore: /etc/ssl/virtualmin/1728425052178431/ssl.combined. And guess what? I can confirm that the file is indeed missing?! I do have a few others but I guess that those are for other domains maybe?

Any tips on how to regenerate that or rebuild it using Let’s Encrypt? I’m hoping there’s a magic command that will save the day here.

Ohhhh, maybe look in the config file, see the domain it is configured for and then request a cert again for that domain maybe?

Okay I’ve got that working by removing the virtual subserver then re-add it.

1 Like

This one is done, thanks for all the support!

1 Like

This is some variant of “the wrong site shows up”. There’s a FAQ about it. Happens all the time due to subtle misconfigurations. Troubleshooting Websites | Virtualmin — Open Source Web Hosting Control Panel

That can’t be related to nginx or Apache. Literally impossible. (Except the autoconfig URL and webmail redirect, if you’re using those. Obviously that can be broken by misconfiguring web servers.)

It had nothing to do with each other. It was just people around me complaining and forgetting to update their settings in Outlook. They needed to go to the email settings, navigate to the ‘Outgoing’ tab, and select the ‘Server requires authentication’ option.

HMM,

I might be a bit of a noob, but this wouldn’t be very helpful on a LEMP instance. I can figure out which locations to check, but there are also others who might need some guidance. :wink:

I followed the FAQ, at least the parts that applied. The last step was Apache-related, and I didn’t dare touch that! However, all the IP addresses and settings were exactly as mentioned in the FAQ, so I hadn’t made any mistakes there.

I’ve post about this, seems like it still a issue.