2

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

  • Do you see entries in the nginx log where the service is trying to access you and getting the 404 responses? – Michael - sqlbot Jul 12 '18 at 23:27
  • I'm getting a connection timeout on www.nodrama.io, I suspect your DNS has not the proper configuration and doesn't answer properly so the request ends on your server – Tensibai Jul 13 '18 at 6:00
  • DNS is just: nodrama.io / A / 18.217.237.232 nodrama.io / AAAA / 2600:1f16:14a:7b00:e9ba:752c:feb8:49d5 www.nodrama.io / CNAME / nodrama.io – fbielejec Jul 13 '18 at 8:32

Your Answer

By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.