Hi,
I have a problem with renewing one of my sites on a Digital Ocean server. The other sites (+10) do not have this problem and renew without problems.
Trying to renew the site certificate against the staging api I get this response. Using curl to access the file gives me a correct result back but not via Let’s Encrypt.
{
"type": "http-01",
"status": "invalid",
"error": {
"type": "urn:acme:error:unauthorized",
"detail": "Invalid response from http://inwestcorp.se/.well-known/acme-challenge/lL-as2ZPJxbhRNhFyFyOAFW9b4mFQJrjagCV4Qdc07A: \"\u003c!DOCTYPE html\u003e\n\n\u003c!--// OPEN HTML //--\u003e\n\u003chtml lang=\"sv-SE\" prefix=\"og: http://ogp.me/ns#\"\u003e\n\n\t\u003c!--// OPEN HEAD //--\u003e\n\t\u003chead\u003e\n\t\t\n\t\"",
"status": 403
},
"uri": "https://acme-staging.api.letsencrypt.org/acme/challenge/ragNnMIVL9CjT3uej8GEZMXUhVojXKM8HLIFkV-chpM/43393666",
"token": "lL-as2ZPJxbhRNhFyFyOAFW9b4mFQJrjagCV4Qdc07A",
"keyAuthorization": "lL-as2ZPJxbhRNhFyFyOAFW9b4mFQJrjagCV4Qdc07A.Oj_C9tHEn2CiSV82gtHgMcSmDa2Z-26iKWRq6bT9rhI",
"validationRecord": [
{
"url": "http://www.inwestcorp.se/.well-known/acme-challenge/lL-as2ZPJxbhRNhFyFyOAFW9b4mFQJrjagCV4Qdc07A",
"hostname": "www.inwestcorp.se",
"port": "80",
"addressesResolved": [
"188.166.133.135",
"2a00:16d8:2:200::20"
],
"addressUsed": "188.166.133.135",
"addressesTried": []
},
{
"url": "http://inwestcorp.se/.well-known/acme-challenge/lL-as2ZPJxbhRNhFyFyOAFW9b4mFQJrjagCV4Qdc07A",
"hostname": "inwestcorp.se",
"port": "80",
"addressesResolved": [
"188.166.133.135",
"2a00:16d8:2:200::20"
],
"addressUsed": "2a00:16d8:2:200::20",
"addressesTried": []
}
]
}
What the LE bot sees seems to be the beginning of the web page itself.
The relevant server blocks in nginx:
server {
listen 80;
server_name www.inwestcorp.se inwestcorp.se;
include acme-challenge-location.conf;
location / {
return 301 https://$host$request_uri;
}
}
And acme-challenge-location.conf
:
location ^~ /.well-known/acme-challenge/ {
alias /srv/www/letsencrypt/;
try_files $uri =404;
}
I have read other threads with similar problems but have not found anything that applies to my situation.
- Do you have any ideas as to why Let’s Encrypt fails for just this site but not the others?
- And why it is accessible with curl but not by Let’s Encrypt?