Hi, I’m trying to install a cert on a VPS intended to use subdomain media.smarteye.id.
I already created the .well-known/acme-challenge dir, and can test a file from that dir. (It’s still available on: http://media.smarteye.id/.well-known/acme-challenge/test.html).
I use nginx as webserver and here is the content of the “server” block:
server {
listen 80;
server_name media.smarteye.id;
root /home/ubuntu;
###########################################################################################
# General
###########################################################################################
location ^~ /.well-known/ {
access_log off;
log_not_found off;
root /home/ubuntu;
autoindex off;
index index.html; # "no-such-file.txt",if expected protos don't need it
try_files $uri $uri/ =404;
}
location / {
index index.html;
}
}
The error message mentions possibility of AAAA IPv6 entry so I checked that as well. It seems there is no IPv6 entry for my site:
fahmi@fahmi-pc:~$ curl -X GET -I -6 http://media.smarteye.id/.well-known/acme-challenge/test.txt
curl: (6) Could not resolve host: media.smarteye.id
fahmi@fahmi-pc:~$ curl -X GET -I -4 http://media.smarteye.id/.well-known/acme-challenge/test.txt
HTTP/1.1 200 OK
Server: nginx/1.11.5
Date: Thu, 30 Aug 2018 01:54:48 GMT
Content-Type: text/plain
Content-Length: 7
Last-Modified: Thu, 30 Aug 2018 01:45:30 GMT
ETag: “5b874c3a-7”
Accept-Ranges: bytes
My domain is:
media.smarteye.id
I ran this command:
sudo certbot --nginx certonly -d media.smarteye.id
It produced this output:
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator nginx, Installer nginx
Starting new HTTPS connection (1): acme-v02.api.letsencrypt.org
Obtaining a new certificate
Performing the following challenges:
http-01 challenge for media.smarteye.id
Waiting for verification…
Cleaning up challenges
Failed authorization procedure. media.smarteye.id (http-01): urn:ietf:params:acme:error:unauthorized :: The client lacks sufficient authorization :: Invalid response from http://media.smarteye.id/.well-known/acme-challenge/-HC8uTlbnLBV5JeRQhyp7GXaEZjSxw3t38a8fHbNl5M: "
404 Not Found
"
IMPORTANT NOTES:
-
The following errors were reported by the server:
Domain: media.smarteye.id
404 Not Found
Type: unauthorized
Detail: Invalid response from
http://media.smarteye.id/.well-known/acme-challenge/-HC8uTlbnLBV5JeRQhyp7GXaEZjSxw3t38a8fHbNl5M:
"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.
My web server is (include version): Nginx 1.11.5
The operating system my web server runs on is (include version): Ubuntu 16.04
My hosting provider, if applicable, is: AWS
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): no