Re-install certificate

Please fill out the fields below so we can help you better. Note: you must provide your domain name to get help. Domain names for issued certificates are all made public in Certificate Transparency logs (e.g. https://crt.sh/?q=example.com), so withholding your domain name here does not increase secrecy, but only makes it harder for us to provide help.

My domain is:shesheds.co.nz

I ran this command:

It produced this output:

My web server is (include version):nginx 1.18

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

My hosting provider, if applicable, is:

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

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

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

I had Ubuntu 18.04 and everything was working fine. I decided to upgrade to Ubuntu 20.04 but unfortunately the upgrade went sideways. Rather than repair things I have decided to start again with a fresh install of Ubuntu 20.04 to take advantage of root on zfs. So I am wondering how to re-install my certificates. I have restored my back up of nginx but that’s complaining

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

because there is no /etc/letsencrypt/live directory.

What is the procedure in a situation like this?

I tried this:

root@mail:/home# sudo /snap/bin/certbot --nginx --agree-tos --redirect --staple-ocsp -d     shesheds.co.nz -d www.shesheds.co.nz -d nextcloud.shesheds.co.nz -d www.nextcloud.shesheds.co.nz -d admin.shesheds.co.nz -d www.admin.shesheds.co.nz --email info@shesheds.co.nz
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Error while running nginx -c /etc/nginx/nginx.conf -t.

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

The nginx plugin is not working; there may be problems with your existing configuration.
The error was: MisconfigurationError('Error while running nginx -c /etc/nginx/nginx.conf -t.\n\nnginx: [emerg] cannot load certificate "/etc/letsencrypt/live/shesheds.co.nz/cert.pem": BIO_new_file() failed (SSL: error:02001002:system library:fopen:No such file or directory:fopen(\'/etc/letsencrypt/live/shesheds.co.nz/cert.pem\',\'r\') error:2006D080:BIO routines:BIO_new_file:no such file)\nnginx: configuration file /etc/nginx/nginx.conf test failed\n')

Hi @Jedi

you have different options:

  • use --standalone to create one working certificate, install that
  • disable that not working vHost, so you can start your nginx
  • add a self signed certificate, so your nginx is able to start

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