Hello, I had to do a domain name change from to .com
When I tried to reinstall a SSL certificate to the new domain name, I encountered many issues:
My domain is:
I ran this command:
sudo certbot certificates
sudo certbot revoke --certname (ex domain name)
Then I did:
sudo certbot --apache
It produced this output:
The apache plugin is not working; there may be problems with your existing configuration.
The error was: MisconfigurationError("Error while running apache2ctl configtest.\nAction 'configtest' failed.\nThe Apache error log may have more information.\n\nAH00526: Syntax error on line 17 of /etc/apache2/sites-enabled/lamp-server-le-ssl.conf:\nSSLCertificateFile: file '/etc/letsencrypt/live/bonusmeup.com/fullchain.pem' does not exist or is empty\n")
My web server is (include version): Apache Debian 11
The operating system my web server runs on is (include version):
My hosting provider, if applicable, is: Google cloud
I can login to a root shell on my machine (yes or no, or I don't know): Yes
The version of my client is (e.g. output of certbot --version or certbot-auto --version if you're using Certbot): certbot 2.7.4
To overcome the current situation you will have to first get Apache to start.
For that you will have to do one of these:
remove the broken config file a2dissite /etc/apache2/sites-enabled/lamp-server-le-ssl.conf
[then reenable it after you have replaced the missing cert]
provide that vhost config file a [temporary] cert for it to use [and get Apache to start]
a. point the files to the snake-oil cert [found somewhere on your drive]
b. point the files to any other valid cert [even if it doesn't cover the names in that vhost]
[again, just to get Apache to start]
Thanks for the help but this is the message i receive:
romain@bonusme-up-vm:~$ a2dissite /etc/apache2/sites-enabled/lamp-server-le-ssl.conf
-bash: a2dissite: command not found
romain@bonusme-up-vm:~$
It does exists.
hmm...
Try it with sudo: sudo a2dissite /etc/apache2/sites-enabled/lamp-server-le-ssl.conf
If that fails to run, then also include the entire path in the command: sudo /usr/sbin/a2dissite /etc/apache2/sites-enabled/lamp-server-le-ssl.conf