Previously working, abruptly not with the titular error. I tried certbot -q renew --nginx
but ran into an error that the .pem files weren't found. I noticed in /etc/nginx/sites-available/my-site
that there was a number of incorrect paths to /etc/letsencrypt/live/my-domain.com/
(for example, ssl_certificate /etc/letsencrypt/live/wrong-domain.com/fullchain.pem
). nginx -t
failed to validate the path. After fixing the config paths to point to the correct domain and re-running certbot
, the certificate was renewed and nginx -t
ran clean.
I'm not sure how the bad links got into the nginx config in the first place, though, or why this config only suddenly started to matter, since the site worked fine for over a year without intervention (other than a domain name renewal nearly 90 days ago, but not quite--might be related).
I may need a cron job to auto-renew.