Error after deleting

My domain is:

www.eugenekimportfolio.com

I ran this command:

sudo certbot delete

It produced this output:

Saving debug log to /var/log/letsencrypt/letsencrypt.log

Error while running apache2ctl configtest.

Action ‘configtest’ failed.

The Apache error log may have more information.

AH00526: Syntax error on line 10 of /etc/apache2/sites-enabled/baseballstats.eugenekimportfolio.com-le-ssl.conf:

SSLCertificateFile: file ‘/etc/letsencrypt/live/baseballstats.eugenekimportfolio.com/fullchain.pem’ does not exist or is empty

I can login to a root shell on my machine (yes or no, or I don’t know):

i dont know

The version of my client is (e.g. output of certbot --version or certbot-auto --version if you’re using Certbot):

certbot 0.31.0

Description

I’ve seen similar topics on this forum, but I still can’t seem to figure out how to fix this. I should have just let the cert expire, but I regardless it’s too late now, and I tried to just delete it manually with sudo certbot delete. Now whenever i try to run sudo certbot --apache, it gives the above error (looking for the .pem file of the domain i just deleted).

I can’t seem to access /etc/letsencrypt/archive or any of those dirs at all either.

Appreciate any help I can get… I’m pretty new at all this if it isn’t obvious already. Thanks.

What did you try to accomplish with deleting the certificates in the first place? That might be a good start to understand what you’re trying to do.

1 Like

Certbot only runs if there are no syntax errors on Apache. If you manually deleted the file, apache throws up a Syntax error because it can't find the file.

An option is to manually edit the vhost config file & comment out the SSLCertificate lines:

#SSLCertificateFile /path/to/cert
#SSLCertificateChainFile /path/to/chain
#SSLCertificateKeyFile /path/to/key

Hi @ekim1707

disable that vHost. Then it doesn't block your Apache.

2 Likes

Thank you so much for all your help. That took care of it completely.

As a follow-up question, can i just manually rm those .conf files now from my /etc/apache2/sites-available folder if I don’t need them anymore? Or is it better to just leave them with the commented out parts?

@Osiris it was a little silly, but i’m new to this. instead of just letting the domain’s cert just expire on its own, i was following some stack-overflow advice and i accidentally renewed the cert instead. I understand i could’ve just let it expire again, but i felt a little too ocd for that, so i just tried to manually delete it using the instructions to use sudo certbot delete (at the very least, i figured i would learn how to do something new… and i guess overall i did, so that’s only a good thing).

1 Like

I would remove the conf files if you're absolutely certain you're no longer using them. You can do a scream test by renaming them & adding a .bak extension to disable them.

1 Like

Sounds perfect and will do. Thank you!

Eugene

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.