Trouble getting started with Nginx webroot


#1

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. xxx.com (http-01): urn:acme:error:connection :: The server could not connect to the client to verify the domain :: Could not connect to http://xxx.com/.well-known/acme-challenge/kaROusEGknWfmVQaFFdvnHt1Lnx43FO_GH16-k0zB4E

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

   Domain: xxx.com
   Type:   connection
   Detail: Could not connect to http://xxx.com/.well-
   known/acme-challenge/kaROusEGknWfmVQaFFdvnHt1Lnx43FO_GH16-k0zB4E

   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?


#2

on your server:

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

in a browser:

http://example.com/.well-known/test.txt

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.


#3

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