ERROR: Challenge is invalid!

My domain is: kalmarsundsrestauranger.se and guldfagelnarenarestaurang.se

I ran this command: Using lets Encrypt button on forge-panel.

It produced this output:

--2020-06-15 09:28:15--  https://forge-certificates.laravel.com/le/825943/472780?env=production
Resolving forge-certificates.laravel.com (forge-certificates.laravel.com)... 172.67.71.125, 104.26.12.100, 104.26.13.100, ...
Connecting to forge-certificates.laravel.com (forge-certificates.laravel.com)|172.67.71.125|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: ‘letsencrypt_script1592213295’

     0K ..                                                     38.6M=0s

2020-06-15 09:28:15 (38.6 MB/s) - ‘letsencrypt_script1592213295’ saved [3021]

Cloning into 'letsencrypt1592213295'...
ERROR: Challenge is invalid! (returned: invalid) (result: {
  "type": "http-01",
  "status": "invalid",
  "error": {
    "type": "urn:ietf:params:acme:error:unauthorized",
    "detail": "Invalid response from http://guldfagelnarenarestaurang.se/.well-known/acme-challenge/pJzbFkS-GeNIu-QwZNSjc5Pu6ExayZ6REZb1sV36-bo [109.74.9.92]: \"\u003c!DOCTYPE html\u003e\\n\u003chtml lang=\\\"sv-SE\\\" prefix=\\\"og: http://ogp.me/ns#\\\"\u003e\\n\u003chead\u003e\\n    \u003cmeta http-equiv=\\\"X-UA-Compatible\\\" content=\\\"IE=edg\"",
    "status": 403
  },
  "url": "https://acme-v02.api.letsencrypt.org/acme/chall-v3/5251393324/cbRrPg",
  "token": "pJzbFkS-GeNIu-QwZNSjc5Pu6ExayZ6REZb1sV36-bo",
  "validationRecord": [
    {
      "url": "http://guldfagelnarenarestaurang.se/.well-known/acme-challenge/pJzbFkS-GeNIu-QwZNSjc5Pu6ExayZ6REZb1sV36-bo",
      "hostname": "guldfagelnarenarestaurang.se",
      "port": "80",
      "addressesResolved": [
        "109.74.9.92"
      ],
      "addressUsed": "109.74.9.92"
    }
  ]
})

My web server is (include version): nginx

The operating system my web server runs on is (include version):

My hosting provider, if applicable, is: glesys

I can login to a root shell on my machine (yes or no, or I don’t know): yes

I’m using a control panel to manage my site (no, or provide the name and version of the control panel): Forge

I have also tried all of these settings, non of them work.
#location ~ /.(?!well-known).* {
# deny all;
#}

location ~ /.well-known {
    allow all;
    auth_basic off;
}
#location ^~ /.well-known/acme-challenge/ {
    #allow all;
    #default_type "text/plain";
#}
1 Like

Please, is there someone who can help. I am now trying on another site, getting the same result.

Does your script have redirections in place that will redirect all unknown pages to a 404 page?
I don’t have any experience with the software (panel) you used, so if you are using nginx and able to modify your configuration panel manually, can you try to move the well-known location block above your root and php reference? (that might help)

1 Like

Thanks, unfortunately it didn´t work.
We have generated a cert with a plugin before, I´m wondering if that´s whats causing the problem.

We have now removed all old stuff, just using http for now.
Will try obtain new certificate in an hour (too many requests for now).

2 Likes