My domain is:
“occamsmachete.com”
I ran this command:
sudo certbot --authenticator webroot --installer nginx
It produced this output:
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator webroot, Installer nginx
Which names would you like to activate HTTPS for?
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1: occamsmachete.com
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Select the appropriate numbers separated by commas and/or spaces, or leave input
blank to select all options shown (Enter 'c' to cancel): 1
Obtaining a new certificate
Performing the following challenges:
http-01 challenge for occamsmachete.com
Input the webroot for occamsmachete.com: (Enter 'c' to cancel): /home/pat/occamsmachete.com/
Waiting for verification...
Challenge failed for domain occamsmachete.com
http-01 challenge for occamsmachete.com
Cleaning up challenges
Some challenges have failed.
IMPORTANT NOTES:
- The following errors were reported by the server:
Domain: occamsmachete.com
Type: connection
Detail: Fetching
http://occamsmachete.com/.well-known/acme-challenge/b25nbc8A5dZA9HP46VT8WSM2OgkYTkSiCjGPQuvnDx8:
Connection refused
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. 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 verify
that you are serving files from the webroot path you provided.
My web server is (include version):
nginx version: nginx/1.18.0 (Ubuntu)
The operating system my web server runs on is (include version):
Ubuntu 20.04
My hosting provider, if applicable, is:
Self hosted
I can login to a root shell on my machine (yes or no, or I don’t know):
yes
I’m using a control panel to manage my site (no, or provide the name and version of the control panel):
no
The version of my client is (e.g. output of certbot --version
or certbot-auto --version
if you’re using Certbot):
certbot 1.7.0
from Ubuntu snap certbot “classic”
The acme-challenge fails.
I have /home/pat/occamsmachete.com/.well-known/acme-challenge mapped to /.well-known/acme-challenge with a dummy html file at http://occamsmachete.com/.well-known/acme-challenge/dummy.html This is accessible from curl and browsers. So the acme challenge path seems to be writable via the filesystem and accessible via http.
I have nginx setup to host a node.js blog but allow the challenge path to also be available:
server {
listen 80;
server_name occamsmachete.com;
root /home/pat/occamsmachete.com;
index index.html;
location / {
proxy_pass http://127.0.0.1:2368;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-Proto https;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
location /.well-known/acme-challenge {
default_type "text/plain";
root /home/pat/occamsmachete.com/;
}
}
certbot reads the nginx config and knows my domain name. The domain is hosted on enom and points to my server as can be seen by following the URL. Certbot asks for my webroot, which I enter as “/home/occamsmachete.com” but fails as shown above with “Connection refused” log attached.
letsencrypt.log here: https://gist.github.com/pferrel/cf1320513b58c5007e470675991c5bb2
Not sure what I’m doing wrong but I’ve tried many variations and am being blocked temporarily.