How to renew a certificate when the challenge path has moved


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., so withholding your domain name here does not increase secrecy, but only makes it harder for us to provide help.

My domain

I ran this command:./certbot-auto renew

It produced this output:

Encountered exception during recovery:
Traceback (most recent call last):
File “/opt/”, line 108, in _call_registered
File “/opt/”, line 310, in _cleanup_challenges
File “/opt/”, line 222, in cleanup
OSError: [Errno 2] No such file or directory: ‘/home/creatissus/public_html/preprod/.well-known/acme-challenge/J3RfEiEcEiEEK5mzwNQupagiTMsI6zVXc85q-SctaBI’
Attempting to renew cert ( from /etc/letsencrypt/renewal/ produced an unexpected error: [Errno 2] No such file or directory: ‘/home/creatissus/public_html/preprod’. Skipping.

My web server is (include version):Apache
Debian 8
The operating system my web server runs on is (include version):

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):Webmin

I recently moved the root of website up one level from /preprod to /
Now the challenge fails. I can delete the SSL but is there another way to it?


Yeah, I believe the recommended way is to re-run the command you ran to obtain the cert originally, but changing the webroot path to the updated one (presumably /home/creatissus/public_html). Alternatively you can change it directly in /etc/letsencrypt/renewal/ and run ./certbot-auto renew again.

If you frequently move things around you might try switching to using the --apache plugin rather than --webroot. The apache plugin creates its own temporary webroot and so doesn’t require knowledge of where the real webroot is.


ok thank you, I’ll try with apache, it didn’t work in the past that’s why I use webroot instead.


Hi i run the command and get the following message :



Hi @refschool, you got that message when running ./certbot-auto --apache?


Hi I didn’t run this commande because I dont to want alter the Apache configuration file…
I have 30 domains,if I run --apache (by the way i couln’t find a suitable documentation) are all the domains impacted? I just want to run for one domain only thanks.


Ok it works when i run this command

./certbot-auto certonly --webroot -w /home/creatissus/public_html/ -d

the problem is with the non www when i append -d at the end

I have a catchall A record set up (with the *)


This is tricky to diagnose in a browser due to the invalid certificate error (I instead used the command-line program curl), but the problem here is that and are serving different content—so their respective configurations don’t point to the same content on the server. In turn that means that -w /home/creatissus/public_html is only the correct webroot location for posting content on, but not for posting content on

You can fix this either by updating the web server configuration so that has the same configuration as, or by figuring out what the webroot directory for should be and specifying it with an additional -w option to Certbot, like

./certbot-auto certonly --webroot -w /home/creatissus/public_html/ -d -w /somewhere-else/on-your/server -d


I want and to serve the same content, so I have in my apahce config file

So i solved the problem by putting in the apache config file EITHER for ssl and non ssl the above directives.