I'm trying to obtain ssl certificate for the following server:
server {
server_name www.nodrama.io;
rewrite ^(.*) http://nodrama.io$1 permanent;
}
server {
server_name nodrama.io;
listen 80;
listen [::]:80 ipv6only=on;
error_page 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 420 422 423 424 426 428 429 431 444 449 450 451 500 501 502 503 504 505 506 507 508 509 510 511 /X0X.html;
location = /X0X.html {
root /usr/share/nginx/html/;
internal;
}
location ~ /.well-known {
allow all;
}
location = / {
# temporary redirect before we server our own page
rewrite ^/$ http://blog.nodrama.io redirect;
}
}
Running:
sudo certbot --nginx -d nodrama.io -d www.nodrama.io
I get:
Starting new HTTPS connection (1): acme-v01.api.letsencrypt.org
Obtaining a new certificate
Performing the following challenges:
http-01 challenge for nodrama.io
http-01 challenge for www.nodrama.io
Waiting for verification...
Cleaning up challenges
IMPORTANT NOTES:
- The following errors were reported by the server:
Domain: www.nodrama.io
Type: unauthorized
Detail: Invalid response from
http://www.nodrama.io/.well-known/acme-challenge/lMEKfsPUnxowmND04ky9sXbFxUERwuna9hsMRHtBv8A:
"<html>
<head><title>404 Not Found</title></head>
<body bgcolor="white">
<center><h1>404 Not Found</h1></center>
<hr><center>"
Domain: nodrama.io
Type: unauthorized
Detail: Invalid response from
http://nodrama.io/.well-known/acme-challenge/Wml_6nPNrPebbONMLtNbg7yUaDihATrzYluA91Era9s:
"<html>
<head><title>404 Not Found</title></head>
<body bgcolor="white">
<center><h1>404 Not Found</h1></center>
<hr><center>"
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.
I can access a test file:
http://nodrama.io/.well-known/acme-challenge/test.txt http://www.nodrama.io/.well-known/acme-challenge/test.txt