acme-challenge gets created and then removed again
If I add that folder I can retrieve files from there as well
I have added a file into there instead
This is an extract from the last letsencrypt log
I notice that certbot is trying http rather then https
When this happens the 301 happens and the renew fails
2017-10-01 23:11:12,473:DEBUG:certbot.reporter:Reporting to user: The following errors were reported by the server:
Domain: folders.cordelia-malthere.com
Type: unauthorized
Detail: Invalid response from http://folders.cordelia-malthere.com/.well-known/acme-challenge/tAklTuFst0WGzgeVsOwLo-bjqHMGJ3s4kgzw5mC5OL0: "
404 Not Found
404 Not Found
"
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.
2017-10-01 23:11:12,473:INFO:certbot.auth_handler:Cleaning up challenges
2017-10-01 23:11:12,473:DEBUG:certbot.plugins.webroot:Removing /var/www/vhosts/folders.cordelia-malthere.co.uk/httpdocs/.well-known/acme-challenge/tAklTuFst0WGzgeVsOwLo-bjqHMGJ3s4kgzw5mC5OL0
2017-10-01 23:11:12,474:DEBUG:certbot.plugins.webroot:All challenges cleaned up, removing /var/www/vhosts/folders.cordelia-malthere.co.uk/httpdocs/.well-known/acme-challenge
2017-10-01 23:11:12,474:WARNING:certbot.renewal:Attempting to renew cert (folders.cordelia-malthere.com) from /etc/letsencrypt/renewal/folders.cordelia-malthere.com.conf produced an unexpected error: Failed authorization procedure. folders.cordelia-malthere.com (http-01): urn:acme:error:unauthorized :: The client lacks sufficient authorization :: Invalid response from http://folders.cordelia-malthere.com/.well-known/acme-challenge/tAklTuFst0WGzgeVsOwLo-bjqHMGJ3s4kgzw5mC5OL0: "
404 Not Found
404 Not Found
". Skipping.
2017-10-01 23:11:12,475:DEBUG:certbot.renewal:Traceback was:
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/certbot/renewal.py", line 421, in handle_renewal_request
main.renew_cert(lineage_config, plugins, renewal_candidate)
File "/usr/lib/python2.7/dist-packages/certbot/main.py", line 650, in renew_cert
_get_and_save_cert(le_client, config, lineage=lineage)
File "/usr/lib/python2.7/dist-packages/certbot/main.py", line 77, in _get_and_save_cert
renewal.renew_cert(config, domains, le_client, lineage)
File "/usr/lib/python2.7/dist-packages/certbot/renewal.py", line 297, in renew_cert
new_certr, new_chain, new_key, _ = le_client.obtain_certificate(domains)
File "/usr/lib/python2.7/dist-packages/certbot/client.py", line 318, in obtain_certificate
self.config.allow_subset_of_names)
File "/usr/lib/python2.7/dist-packages/certbot/auth_handler.py", line 81, in get_authorizations
self._respond(resp, best_effort)
File "/usr/lib/python2.7/dist-packages/certbot/auth_handler.py", line 138, in _respond
self._poll_challenges(chall_update, best_effort)
File "/usr/lib/python2.7/dist-packages/certbot/auth_handler.py", line 202, in _poll_challenges
raise errors.FailedChallenges(all_failed_achalls)
FailedChallenges: Failed authorization procedure. folders.cordelia-malthere.com (http-01): urn:acme:error:unauthorized :: The client lacks sufficient authorization :: Invalid response from http://folders.cordelia-malthere.com/.well-known/acme-challenge/tAklTuFst0WGzgeVsOwLo-bjqHMGJ3s4kgzw5mC5OL0: "
404 Not Found
404 Not Found
"
and this is a snippet from the nginx config
server {
listen 80;
server_name folders.cordelia-malthere.com;
return 301 https://folders.cordelia-malthere.com$request_uri;
}
server {
listen 80; ## listen for ipv4; this line is default and implied
listen 443 ssl http2;
server_name folders.cordelia-malthere.com;
root /var/www/vhosts/folders.cordelia-malthere.com/httpdocs;
access_log /var/log/nginx/folders.cordelia-malthere_access.log;
error_log /var/log/nginx/folders.cordelia-malthere_error.log;
include snippets/ssl-folders-cordelia-malthere.conf;
include snippets/ssl-params.conf;
I will find a way to send you the files tomorrow.
Thanks For the help