This is a fresh install of Ubuntu 20.04 with Apache installed. I used the instructions to obtain a wildcard from here: Certbot - Ubuntufocal Apache
The certbot plugin I used is digitalocean.
Here is the command I ran: sudo certbot -a dns-digitalocean --dns-digitalocean -i apache --dns-digitalocean-credentials ~/.secrets/certbot/digitalocean.ini -d *.wpmu.work -d wpmu.work
But you don't show their full path, nor if they are actually being used by Apache, nor if there are any name overlaps/conflicts with other files (not shown).
So, let's start by having a look at what names Apache is using and from which files with: apachectl -S
It looks very much like TCP port 443 is closed on your DigitalOcean droplet. That port is required for HTTPS.
Make sure that you have that port opened on any firewall which is on your server (ufw allow https) and also in the DigitalOcean firewall in your control panel.
apachectl -S Output: AH00526: Syntax error on line 18 of /etc/apache2/sites-enabled/wpmu-le-ssl.conf: SSLCertificateFile: file '/etc/letsencrypt/live/wpmu.work/fullchain.pem' does not exist or is empty Action '-S' failed. The Apache error log may have more information.
I checked the contents of /etc/letsencrypt/live/wpmu.work/fullchain.pem, it exists and has 2 cert... keys? chains? key chains (lol)? Not sure what to call it, but it does have contents inside.
(I have inserted dashes below in an attempt to make this more human readable) ufw status
Status: active
To -------------------Action----------From
OpenSSH---------ALLOW--------Anywhere
Apache-------------ALLOW-------Anywhere
OpenSSH (v6)---ALLOW--------Anywhere (v6)
Apache (v6)-------ALLOW-------Anywhere (v6)
sudo systemctl status apache2
● apache2.service - The Apache HTTP Server
Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
Active: active (running) since Tue 2021-02-09 06:39:58 UTC; 12h ago
Docs: Apache HTTP Server Version 2.4 Documentation - Apache HTTP Server Version 2.4
Main PID: 34573 (apache2)
Tasks: 55 (limit: 1137)
Memory: 8.1M
CGroup: /system.slice/apache2.service
├─34573 /usr/sbin/apache2 -k start
├─34638 /usr/sbin/apache2 -k start
└─34639 /usr/sbin/apache2 -k start
Feb 09 06:39:57 wpmu-work systemd[1]: Starting The Apache HTTP Server...
Feb 09 06:39:57 wpmu-work apachectl[34568]: AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message
Feb 09 06:39:58 wpmu-work systemd[1]: Started The Apache HTTP Server.
Feb 09 06:40:04 wpmu-work systemd[1]: Reloading The Apache HTTP Server.
Feb 09 06:40:04 wpmu-work apachectl[34636]: AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message
Feb 09 06:40:04 wpmu-work systemd[1]: Reloaded The Apache HTTP Server.
I did not have any firewalls setup through the control panel on DO, so I added some (but still same outcome).
DO Firewall Setup: (I have inserted dashes below in an attempt to make this more human readable) INBOUND
SSH------TCP--22------All IPv4 All IPv6
HTTP----TCP--80------All IPv4 All IPv6
HTTPS--TCP--443----All IPv4 All IPv6
MySQL--TCP--3306--All IPv4 All IPv6
OUTBOUND
ICMP-----ICMP------------------All IPv4 All Pv6
All TCP---TCP-----All ports---All IPv4 All IPv6
All UDP---UDP----All ports---All IPv4 All IPv6z
sudo apachectl -S
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message
VirtualHost configuration:
*:443 wpmu.work (/etc/apache2/sites-enabled/wpmu-le-ssl.conf:2)
*:80 wpmu.work (/etc/apache2/sites-enabled/wpmu.conf:1)
ServerRoot: "/etc/apache2"
Main DocumentRoot: "/var/www/html"
Main ErrorLog: "/var/log/apache2/error.log"
Mutex watchdog-callback: using_defaults
Mutex rewrite-map: using_defaults
Mutex ssl-stapling-refresh: using_defaults
Mutex ssl-stapling: using_defaults
Mutex ssl-cache: using_defaults
Mutex default: dir="/var/run/apache2/" mechanism=default
PidFile: "/var/run/apache2/apache2.pid"
Define: DUMP_VHOSTS
Define: DUMP_RUN_CFG
User: name="www-data" id=33
Group: name="www-data" id=33
ls -l /etc/apache2/sites-enabled/
total 0
lrwxrwxrwx 1 root root 35 Feb 9 05:11 wpmu-le-ssl.conf -> ../sites-available/wpmu-le-ssl.conf
lrwxrwxrwx 1 root root 28 Feb 9 04:42 wpmu.conf -> ../sites-available/wpmu.conf
ServerName is defined as wpmu.work (and ServerAlias www.wpmu.work) in both wpmu.conf and wpmu-le-ssl.conf Any thoughts on why Apache cannot determine the domain name?
Not that I know of... or at least that does not sound familiar to me, so I don't think I have made any edits to anything mentioning FW or NAT. I did make some ufw changes, but not sure if that is relative or the same.
Well... that's a match, so the problem has to be somewhere within your server.
[very unlikely that your ISP is blocking port 443]
As there is no need for NAT, we can rule that out.
So that only leaves firewalling.
Now, I see you opened up some ports, but there might be more than one firewall at play.
Do not disable any firewall; as your system is directly connected to the Internet.
We just need to see which are running and how they are configured.
sudo ufw status verbose
Status: active
Logging: on (low)
Default: deny (incoming), allow (outgoing), disabled (routed)
New profiles: skip
To Action From
22/tcp (OpenSSH) ALLOW IN Anywhere
80/tcp (Apache) ALLOW IN Anywhere
22/tcp (OpenSSH (v6)) ALLOW IN Anywhere (v6)
80/tcp (Apache (v6)) ALLOW IN Anywhere (v6)
sudo ufw allow https
Rule added
Rule added (v6)
sudo ufw status verbose
Status: active
Logging: on (low)
Default: deny (incoming), allow (outgoing), disabled (routed)
New profiles: skip
To Action From
22/tcp (OpenSSH) ALLOW IN Anywhere
80/tcp (Apache) ALLOW IN Anywhere
443/tcp ALLOW IN Anywhere
22/tcp (OpenSSH (v6)) ALLOW IN Anywhere (v6)
80/tcp (Apache (v6)) ALLOW IN Anywhere (v6)
443/tcp (v6) ALLOW IN Anywhere (v6)
I checked the site in the browser and it is secure! Thank you for walking me through this @rg305!!!