I have a LAMP stack with multiple virtual hosts. I deleted a virtual host with a website on and forgot to delete the cert, and now the remaining sites are down. There are two other sites and on both the front page works and the rest gives a 404.
Later on, I deleted the cert from the deleted website with certbot delete --cert-name example.com, without luck. The cert is deleted but the situation is the same.
Yes, looks like you have multiple domain names in the same cert which is totally fine. But, does require extra care when making changes. I personally prefer one cert for all the names in one VirtualHost for this reason. But, others prefer a combined cert.
As for troubleshooting, maybe someone else will help with just example names but my experience says we would need the actual domain names to provide help.
The generic help for generic names is just to issue a new cert for the names you need and then delete the certs you don't need. Don't delete them until all references are removed from Apache and anywhere else you might use them.
The Certbot docs have a section on safely deleting certs
VirtualHost configuration:
*:443 is a NameVirtualHost
default server www.a-c-d.net (/etc/apache2/sites-enabled/a-c-d.net-le-ssl.conf:2)
port 443 namevhost www.a-c-d.net (/etc/apache2/sites-enabled/a-c-d.net-le-ssl.conf:2)
alias a-c-d.net
port 443 namevhost www.keto-programs.com (/etc/apache2/sites-enabled/keto-programs.com-le-ssl.conf:2)
alias keto-programs.com
*:80 is a NameVirtualHost
default server www.a-c-d.net (/etc/apache2/sites-enabled/a-c-d.net.conf:1)
port 80 namevhost www.a-c-d.net (/etc/apache2/sites-enabled/a-c-d.net.conf:1)
alias a-c-d.net
port 80 namevhost www.keto-programs.com (/etc/apache2/sites-enabled/keto-programs.com.conf:1)
alias keto-programs.com
Those look like nuisance msgs possibly from bots or maybe friendly scanners checking your HTTPS.
The certs are fine but I think maybe your VirtualHosts got modified when you changed the cert layout. Please show the VirtualHost output from my previous post
<IfModule mod_ssl.c>
<VirtualHost *:443>
ServerName www.keto-programs.com
ServerAlias keto-programs.com
DocumentRoot /var/www/html/keto-programs.com/public_html
RewriteEngine on
# Some rewrite rules in this file were disabled on your HTTPS site,
# because they have the potential to create redirection loops.
# RewriteCond %{SERVER_NAME} =www.keto-programs.com [OR]
# RewriteCond %{SERVER_NAME} =keto-programs.com
# RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
Protocols h2 http/1.1
SSLProtocol +TLSV1.2 +TLSv1.3
Include /etc/letsencrypt/options-ssl-apache.conf
SSLCertificateFile /etc/letsencrypt/live/keto-programs.com/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/keto-programs.com/privkey.pem
</VirtualHost>
</IfModule>
ls -l /var/www/html/keto-programs.com/public_html/what-is-a-keto-diet/ ls: cannot access '/var/www/html/keto-programs.com/public_html/what-is-a-keto-diet/': No such file or directory
No. The weird thing is, it is the same thing with two sites at the same time. Both a-c-d.net and keto-programs.com only have the front page working and the rest is 404. Both sites have been on the same server for a long time. The only thing I did was delete another site and forget to delete the cert.