Good day. I need help to get certificate.
My nginx config like this:
server {
listen *:80;
server_name grafana.$domain.com;
root /srv/www/htdocs/;
access_log /var/log/nginx/grafana.$domain.com.access.log;
error_log /var/log/nginx/grafana.$domain.com.error.log;
client_max_body_size 10m;
location /.well-known {
root /srv/www/htdocs/;
}
location / {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header Host $host;
proxy_pass http://127.0.0.1:3000;
}
}
The return of " certbot-auto certonly --dry-run -a webroot -w /etc/letsencrypt/live/grafana.domain.com/ -d grafana.domain.com" command is:
Domain: grafana.domain.com
Type: unauthorized
Detail: Invalid response from
http://grafana.domain.com/.well-known/acme-challenge/FF2B4zU2pE7FBB0cMgpcMolGC8igaUIZA9Pd2UNrPRU:
html>
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.
But "curl -I http://grafana.****.com/.well-known/acme-challenge/test " return :
HTTP/1.1 200 OK
Server: nginx/1.13.9
Date: Sat, 15 Sep 2018 01:07:26 GMT
Content-Type: application/octet-stream
Content-Length: 7
Last-Modified: Fri, 14 Sep 2018 12:12:18 GMT
Connection: keep-alive
ETag: “5b9ba5a2-7”
Accept-Ranges: bytes
And one refinement. I have one more vhost on this server which have certbot no errors.
Will thanks for help.