-------------------------------------------------------------------------------
Processing /etc/letsencrypt/renewal/fritz.debler.net.conf
-------------------------------------------------------------------------------
Cert not due for renewal, but simulating renewal for dry run
Plugins selected: Authenticator nginx, Installer nginx
Renewing an existing certificate
Performing the following challenges:
http-01 challenge for fritz.debler.net
Using default address 80 for authentication.
Waiting for verification...
Cleaning up challenges
Attempting to renew cert (fritz.debler.net) from /etc/letsencrypt/renewal/fritz.debler.net.conf produced an unexpected error: Failed authorization procedure. fritz.debler.net (http-01): urn:ietf:params:acme:error:unauthorized :: The client lacks sufficient authorization :: Invalid response from http://fritz.debler.net/.well-known/acme-challenge/m1_159ZO9C0cpw3wKU08Jjy2bb3-t494HoMi5Xlfb28: "<html>
<head><title>404 Not Found</title></head>
<body bgcolor="white">
<center><h1>404 Not Found</h1></center>
<hr><center>". Skipping.
All renewal attempts failed. The following certs could not be renewed:
/etc/letsencrypt/live/fritz.debler.net/fullchain.pem (failure)
-------------------------------------------------------------------------------
** DRY RUN: simulating 'certbot renew' close to cert expiry
** (The test certificates below have not been saved.)
All renewal attempts failed. The following certs could not be renewed:
/etc/letsencrypt/live/fritz.debler.net/fullchain.pem (failure)
** DRY RUN: simulating 'certbot renew' close to cert expiry
** (The test certificates above have not been saved.)
-------------------------------------------------------------------------------
1 renew failure(s), 0 parse failure(s)
IMPORTANT NOTES:
- The following errors were reported by the server:
Domain: fritz.debler.net
Type: unauthorized
Detail: Invalid response from
http://fritz.debler.net/.well-known/acme-challenge/m1_159ZO9C0cpw3wKU08Jjy2bb3-t494HoMi5Xlfb28:
"<html>
<head><title>404 Not Found</title></head>
<body bgcolor="white">
<center><h1>404 Not Found</h1></center>
<hr><center>"
To fix these errors, please make sure that your domain name was
entered correctly and the DNS A/AAAA record(s) for that domain
contain(s) the right IP address.
My web server is (include version): nginx 1.4.6
The operating system my web server runs on is (include version): linux mint 17.3
I can login to a root shell on my machine (yes or no, or I don’t know): yes
My nginx config looks like this in order to redirect external port 80 traffic to port 81, because pi-hole is already running on port 80:
I used the automatic installer certbot --nginx and it worked fine, but when running the dry-run renewal command it seems to have problems finding the challenge files.
Not sure if this is correct, but I ran sudo certbot --webroot-path /var/www/html renew --dry-run and sudo certbot renew --dry-run --webroot-path /var/www/html and both lead to the same error.
/home/sicboy/ACMEchallenges/.well-known/acme-challenge/SOMEFILE
and /home/sicboy/ACMEchallenges/SOMEFILE
are not the same…
We need to force them to use the same one.
change: location ~ /.well-known { allow all; root /home/sicboy/ACMEchallenges/; }
to: location /.well-known/acme-challenge/ { allow all; root /home/sicboy/ACMEchallenges/; }
Yes, the redirect was there before I started obtaining the certificate in the first place. The installer seemed to find what it needed.
I just ran the installer again (with the redirection to the ACMEchallenges folder in my home directory) and it installed a new certificate just fine.
Ok, changing root to alias leads to a port error during the dry run:
Attempting to renew cert (fritz.debler.net) from /etc/letsencrypt/renewal/fritz.debler.net.conf produced an unexpected error: Failed authorization procedure. fritz.debler.net (http-01): urn:ietf:params:acme:error:connection :: The server could not connect to the client to verify the domain :: Fetching http://fritz.debler.net:81/.well-known/acme-challenge/5fvdOVuHwmu1jPQKE9E1YFxMzq7HUxHwfziuBASm0b8/: Invalid port in redirect target. Only ports 80 and 443 are supported, not 81. Skipping.
All renewal attempts failed. The following certs could not be renewed:
/etc/letsencrypt/live/fritz.debler.net/fullchain.pem (failure)