E
E
emellstornn2018-07-04 06:38:57
Nginx
emellstornn, 2018-07-04 06:38:57

Why can't I get a letsencrypt nginx certificate?

Good afternoon. The problem is as follows:
when trying to obtain the next certificate for the next domain, I encountered the following error:

- The following errors were reported by the server:

   Domain: waterstarsaunapart.com
   Type:   unauthorized
   Detail: Invalid response from
   http://waterstarsaunapart.com/.well-known/acme-challenge/Tcz1WXPz5Q-CjQlAIzJ2Y69langzO-zTfjxKF5UDyDk:
   "<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 generate like this:
sudo letsencrypt certonly -a webroot --webroot-path=/var/www/landings/data/www/domain.com -d domain.com

There were no problems in obtaining certificates for a damn lot of previous domains (several sites are running on the server). When you go to http, the site opens fine. The domain on the correct IP responds. The nginx configs for all sites are the same, only the directories change.
Dumped for the problematic domain in the line config
location ^~ /.well-known/acme-challenge {                    
        allow all;                                              
        default_type "text/plain";
    }

Does not help. What else can you see?
PS The problem was eventually solved by running certbot simply with the sudo certbot command and going through the key generation procedure. Why certonly stopped working I did not understand. Thanks to everyone who responded.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
L
Ltonid, 2018-07-04
@AtaZ

It says that the file was not found waterstarsaunapart.com/.well-known/acme-challenge/...
Create a file and fill it with a special line

V
Viktor Taran, 2018-07-04
@shambler81

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.

To fix these errors, make sure your domain name was
entered correctly and the DNS A/AAAA record(s) for that domain
contain(s) the correct IP address.
What is not clear here?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question