I'm panicking a bit because I've been working on my crin.co.uk blog for about 9 months and it's just starting to gather momentum. I've now broken it completely while trying to renew the SSL cert.
I switched my site over to SSL a while back and all has been running smoothly. but the certificate expired. This has happened once before and I remember simply running the renew code found here: https://docs.bitnami.com/aws/how-to/generate-install-lets-encrypt-ssl/#step-5-renew-the-let-s-encrypt-certificate
Last time that worked and the site came back online.
This time it didn't work, I was trying to move certificates that I thought I had just generated into /opt/bitnami/nginx/conf by running the commands
sudo mv /opt/bitnami/letsencrypt/certificates/crin.co.uk.key /opt/bitnami/nginx/conf/server.key
sudo mv /opt/bitnami/letsencrypt/certificates/crin.co.uk.crt /opt/bitnami/nginx/conf/server.crt
Doing this has broken things in a way that I don't know how to fix. I can't start nginx. I get the following error:
nginx: [emerg] BIO_new_file("/opt/bitnami/nginx/conf/crin.co.uk.crt") failed (SSL: error:02001002:system library:fopen:No such file or directory:fopen('/opt/bitnami/nginx/conf/crin.co.uk.crt','r') error:2006D080:BIO routines:BIO_new_file:no such file)
/opt/bitnami/nginx/scripts/ctl.sh: 77: [: Illegal number:
/opt/bitnami/nginx/scripts/ctl.sh : Nginx could not be started
So I have two problems...
How do I fix what I have broken?
How do I get my SSL certificate to successfully renew?