Cert is due for renewal, auto-renewing…
Running pre-hook command: service nginx stop
Renewing an existing certificate
Performing the following challenges:
http-01 challenge for red.elsmussols.net
Waiting for verification…
Cleaning up challenges
Attempting to renew cert from /etc/letsencrypt/renewal/red.elsmussols.net.conf produced an unexpected error: Failed authorization procedure. red.elsmussols.net (http-01): urn:acme:error:connection :: The server could not connect to the client to verify the domain :: Fetching http://red.elsmussols.net/.well-known/acme-challenge/Xv6CfjN6CoP2IH7fqAXSIIKneK86ux5vqmJMkyQHu4U: Connection refused. Skipping.
All renewal attempts failed. The following certs could not be renewed:
/etc/letsencrypt/live/red.elsmussols.net/fullchain.pem (failure)
Running post-hook command: service nginx start
1 renew failure(s), 0 parse failure(s)
To fix these errors, please make sure that your domain name was
entered correctly and the DNS A record(s) for that domain
contain(s) the right IP address. Additionally, please check that
your computer has a publicly routable IP address and that no
firewalls are preventing the server from communicating with the
client. If you’re using the webroot plugin, you should also verify
that you are serving files from the webroot path you provided.
The well-known directory exists:
root@pendle:/var/www/red# ls -al | grep well
drwxr-xr-x 2 root root 4096 Nov 16 10:37 .well-known
Guidance and thoughts appreciated, additional information gladly supplied. Thank you in advance.
Cert is due for renewal, auto-renewing…
Renewing an existing certificate
Performing the following challenges:
http-01 challenge for red.elsmussols.net
Waiting for verification…
Cleaning up challenges
Attempting to renew cert from /etc/letsencrypt/renewal/red.elsmussols.net.conf produced an unexpected error: Failed authorization procedure. red.elsmussols.net (http-01): urn:acme:error:unauthorized :: The client lacks sufficient authorization :: Invalid response from http://red.elsmussols.net/.well-known/acme-challenge/lg0l66f-LK0WGPgA3qOYnX6PQaYPc6umI-crhYGnKfc [176.58.122.108]: 404. Skipping.
All renewal attempts failed. The following certs could not be renewed:
/etc/letsencrypt/live/red.elsmussols.net/fullchain.pem (failure)
1 renew failure(s), 0 parse failure(s)
To fix these errors, please make sure that your domain name was
entered correctly and the DNS A record(s) for that domain
contain(s) the right IP address.
Perhaps if I comment out the redirect directive just while I’m renewing the cert?
So that’s a fail. I get redirected to https and get an insecure notification (the cert is now expired). If I approve an exception I get a blank page. The file is definitely in the right place:
root@pendle:~# cat /var/www/red/.well-known/acme-challenge/test.txt
Testing to see if acme-challenge can get here.
As I mentioned above:
root@pendle:/var/www/red# ls -al | grep well
drwxr-xr-x 2 root root 4096 Nov 16 10:37 .well-known
Is the ownership of this correct? Perhaps this directory and its contents should be www-data:www-data not root:root.
That might be the correct location, but if I request your test.txt file I get a 404 - and a Set-Cookie and Expires header from PHP. Could there be something in your nginx configuration routing those URLs to PHP instead of serving them from the filesystem?
I’m not familiar enough with nginx config to say for sure, but it’s worth a try if it works you might then be able to find some alternative config that can be left in place permanently.
Perhaps someone more familiar with nginx can help with that.