I've seen all the 404 Q's here I could manage without my brain melting. Mine seems not to match the others well in detail. I can use the --webroot flavor of certbot commands to get a cert (dry runs only so far), but the preferable --nginx flavor instead fails with 404 every time, dry run or real run.
I have nginx set up to proxy to local Node.js apps with subdomains, but I'm setting that all aside as needed to get HTTPS working; to work with certbot, I put in a first-in-server-block
root /var/www directive (not
/var/www/html for now at least), and made sure I could access an HTML file there using curl with nginx running. Actually I added a
.well-known/acme-challenge subfolder tree there as well and can get HTML from there.
Oh yes, I also saw old advice here about using let's debug . net, and I tried that. It said there were no apparent issues with the site.
Anyway, what am I doing wrong? Surely it isn't supposed to be this hard. I'm a newbie to this stuff but not an idiot. What have I missed?
Please fill out the fields below so we can help you better. Note: you must provide your domain name to get help. Domain names for issued certificates are all made public in Certificate Transparency logs (e.g. crt.sh | example.com), so withholding your domain name here does not increase secrecy, but only makes it harder for us to provide help.
My domain is: jadeemperorware.com
I ran this command:
certbot --nginx -d jadeemperorware.com
certbot --dry-run --webroot -w /var/www -d jadeemperorware.com
It produced this output:
Certbot failed to authenticate some domains (authenticator: nginx). The Certificate Authority reported these problems: Domain: jadeemperorware.com Type: unauthorized Detail: 126.96.36.199: Invalid response from http://jadeemperorware.com/.well-known/acme-challenge/R4kJVcmXNSRQBoJoyCu9U9mCVdirBSfcuBSz72vV5jc: 404
Simulating a certificate request for jadeemperorware.com The dry run was successful.
My web server is (include version): nginx/1.18.0 (Ubuntu)
The operating system my web server runs on is (include version):
NAME="Ubuntu" VERSION_ID="22.04" VERSION="22.04.2 LTS (Jammy Jellyfish)"
My hosting provider, if applicable, is: Vultr
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 2.5.0