I have been trying certbot to issue a certificate, but the challenge keeps failing. I also made a .well-known/acme-challenge available through nginx settings. Nothing seems to be working.
My domain is: posherry.com
I ran this command: sudo certbot certonly --nginx -d posherry.com -d www.posherry.com --dry-run --webroot- path /var/www/html
It produced this output:
Failed authorization procedure. posherry.com (http-01): urn:ietf:params:acme:error:unauthorized :: The client lacks sufficient authorization :: Invalid response from http://posherry.com/.well-known/acme-challenge/PICPsfGsrWq8aNkpnJ9Ms7Kc_g_UlDWQRbKOjaSCCIw: "<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initi"
IMPORTANT NOTES:
- The following errors were reported by the server:
Domain: posherry.com
Type: unauthorized
Detail: Invalid response from
http://posherry.com/.well-known/acme-challenge/PICPsfGsrWq8aNkpnJ9Ms7Kc_g_UlDWQRbKOjaSCCIw:
"<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initi"
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.14.0
The operating system my web server runs on is (include version): Ubuntu 18.04
My hosting provider, if applicable, is: DigitalOcean
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): SSH, no control panel