I deleted the certificates: sudo certbot delete
Yes. I tried restarrting the nginx server several times & got the same error before and after deleting the certificates.
no “ssl_certificate_key” is defined for certificate “/etc/letsencrypt/live/apna5.com/fullchain.pem”
What does “ sudo nginx -T ” show now? : Shows the same error
nginx: [emerg] no “ssl_certificate_key” is defined for certificate “/etc/letsencrypt/live/apna5.com/fullchain.pem”
nginx: configuration file /etc/nginx/nginx.conf test failed
/etc/nginx/nginx.conf is Nginx’s central configuration file, right?: Yes.
I deleted the apna5.com certificate & reinstalled it not using the webroot option…
sudo certbot certonly -d www.apna5.com -d apna5.com
& used option 1
1: Spin up a temporary webserver (standalone)
Changed the new location of the fullchain.pem & privkey.pem in the loadbalancer.conf & commented the cert.pem in there as well
Restarted the nginx & it was working…
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
I was able to also add the autorenew… sudo certbot renew --dry-run without issues