I screwed up! Deleted 'live' directory now cannot reinstall

My domain is: bangorcomputer.co.uk

I ran this command: rmdir /etc/letsencrypt/live (yes, I know. Idiot)

It produced this output:nginx: [emerg] cannot load certificate "/etc/letsencrypt/live/bangorcomputer.co.uk-0001

My web server is (include version): Nginx 1.18.0

The operating system my web server runs on is (include version): Ubuntu 20.04

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

I'm using a control panel to manage my site (no, or provide the name and version of the control panel): No

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

I was having a few problems with renewal (old certificate was being used despite being out of date), and in a sudden and stupid rush of blood to thehead I deleted the /etc/letsencrypt/live/ directory. When I try to run certbot --nginx i get errors like this

Prep: Error while running nginx -c /etc/nginx/nginx.conf -t.

nginx: [emerg] cannot load certificate "/etc/letsencrypt/live/bangorcomputer.co.uk-0001/fullchain.pem": BIO_new_file() failed (SSL: error:02001002:system library:fopen:No such file or directory:fopen('/etc/letsencrypt/live/bangorcomputer.co.uk-0001/fullchain.pem','r') error:2006D080:BIO routines:BIO_new_file:no such file)
nginx: configuration file /etc/nginx/nginx.conf test failed

How do I get rid of the cert errors and re-install a cert?

TIA

Huw

Hi @Huw

  • create a self signed and use that
  • disable the https vHosts

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