Answer the question
In order to leave comments, you need to log in
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.
sudo certbot certonly --dry-run -d spb-cc.ru
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";
}
}
curl -L http://spb-cc.ru/.well-known/acme-challenge/example.html
Success
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"
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question