N
N
nano_e_t_42019-05-11 17:14:08
Nginx
nano_e_t_4, 2019-05-11 17:14:08

How to generate a letsEncrypt certificate?

Hello everyone
I can’t figure out how to generate a letsencrypt certificate, I keep getting a 404 error:

IMPORTANT NOTES:
 - The following errors were reported by the server:

   Domain: spb-cc.ru
   Type:   unauthorized
   Detail: Invalid response from
   http://spb-cc.ru/.well-known/acme-challenge/idmtKuEd5CM_yqlWdvqe3XD_lfld82K_rR_fjDUUIsY
   [35.210.209.158]: "<html>\r\n<head><title>404 Not
   Found</title></head>\r\n<body bgcolor=\"white\">\r\n<center><h1>404
   Not Found</h1></center>\r\n<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'm trying to create like this:
sudo certbot certonly --dry-run -d spb-cc.ru
jinx config:
server {
  listen 80;
  server_name spb-cc.ru;
  add_header Strict-Transport-Security max-age=63072000;
  add_header X-Frame-Options DENY;
  add_header X-Content-Type-Options nosniff;
  add_header X-Frame-Options "SAMEORIGIN";

  location / {
    try_files $uri /index.html $uri/ =404;
    alias   /usr/share/spb-cc/;
    index index.html;
  }

location ^~ /.well-known/acme-challenge {
        allow all;
        default_type "text/plain";
    }
}

when I pull the file in /.well-known/acme-challenge with my hands, everything works fine:
curl -L http://spb-cc.ru/.well-known/acme-challenge/example.html
Success

with ipv6 there is no address on the domain. I tried to start but still the same error
in the info jinx logs, that there is no file in ^~ /.well-known/acme-challenge:
2019/05/11 14:00:39 [error] 3182#3182: *31 open() "/usr/share/nginx/html/.well-known/acme-challenge/idmtKuEd5CM_yqlWdvqe3XD_lfld82K_rR_fjDUUIsY" failed (2: No such file or directory), client: 66.133.109.36, server: spb-cc.ru, request: "GET /.well-known/acme-challenge/idmtKuEd5CM_yqlWdvqe3XD_lfld82K_rR_fjDUUIsY HTTP/1.1", host: "spb-cc.ru"

in the log when geth is constantly requested different files

Answer the question

In order to leave comments, you need to log in

2 answer(s)
O
OnYourLips, 2019-05-11
@nano_e_t_4

Better through DNS challenge generate.

V
vreitech, 2019-05-11
@fzfx

why are you waving your hands

http://spb-cc.ru/.well-known/acme-challenge/example.html
when the script wants to see it in
http://spb-cc.ru/.well-known/acme-challenge/idmtKuEd5CM_yqlWdvqe3XD_lfld82K_rR_fjDUUIsY
?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question