My domain is: www.code4com.com
I ran this command: sudo certbot renew --cert-name www.code4com.com
It produced this output:
Challenge failed for domain www.code4com.com Attempting to renew cert (www.code4com.com) from /etc/letsencrypt/renewal/www.code4com.com.conf produced an unexpected error: Some challenges have failed.. Skipping. All renewal attempts failed. The following certs could not be renewed: /etc/letsencrypt/live/www.code4com.com/fullchain.pem (failure)
My web server is (include version): nginx/1.20.2
The operating system my web server runs on is (include version): Ubuntu 20.04.4 LTS
My hosting provider, if applicable, is: it's a dedicated server
I can login to a root shell on my machine: yes
I'm using a control panel to manage my site: no
The version of my client is (e.g. output of
certbot --version or
certbot-auto --version if you're using Certbot): 0.40.0
Since a couple of months I started to have problems obtaining and verifying new certificates on this server. The problem was that was impossibile to have the temporary well-known directive loaded by nginx and the challenges always failed.
I solved with a simple workaround using
directive and, using another terminal, restarting nginx before confirm to check for the .well-known nginx config to be created. nginx reload was not enough.
I think now I have the very same problem but on renewal process...can I use a sort of --debug-challanges on renewal to restart nginx just before the challenge?
Or do you have any advice on how to solve the problem at the source? When I had less domains I was able to renew certificates and to obtains new one simply using
sudo certbot --nginx --non-interactive --redirect -d "URL"
but when the number of domains increased I started to have to restart nginx in the middle of obtaining process, and looks like I now have the same on renewal process.