Trouble getting started with Nginx webroot


I’m having a problem converting over an existing site to use letsencrypt on a CentOS 6 server. The site’s root is located in a user dir. I installed letsencrypt into /root and ran the following:

./letsencrypt-auto certonly --webroot --webroot-path /home/analytics/Sync/www/

The script fails after I enter the domain name:

Failed authorization procedure. (http-01): urn:acme:error:connection :: The server could not connect to the client to verify the domain :: Could not connect to

 - The following errors were reported by the server:

   Type:   connection
   Detail: Could not connect to

   To fix these errors, please make sure that your domain name was
   entered correctly and the DNS A record(s) for that domain
   contain(s) the right IP address. Additionally, please check that
   your computer has a publicly routable IP address and that no
   firewalls are preventing the server from communicating with the
   client. If you're using the webroot plugin, you should also ver

I added this entry to my nginx config:

location ~ /.well-known {
    allow all;

I see that the directory exists but there’s nothing in it:

[root@Analytics letsencrypt]# ls -l /home/analytics/Sync/www/.well-known/
total 0

I tried this with the firewall off, but got the same result. Any suggestions?


on your server:

$ echo 'hello world'  /home/analytics/Sync/www/.well-known/test.txt

in a browser:

work with your logs until you get that file to show.

the letsencrypt client only puts files into that directory during authtentication; it will be black otherwise.


This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.