I'm trying to setup Let's Encrypt certbot on a docker container hosted on nginx.
Since nginx is just a proxy-pass to a docker container, I'm forwarding requests to .well-known to the disk
location /.well-known/acme-challenge/ {
root /var/www/certbot;
}
and calling it like this
certbot --nginx --webroot-path /var/www/certbot -d dev.satrimono.com
It fails the validation:
Invalid response from http://dev.satrimono.com/.well-known/acme-challenge/eSVrXetc
Both nginx root and certbot consider /var/www/certbot
as the root folder and should create .well-known
folder inside of it.
Adding /var/www/certbot/.well-known/acme-challenge/file1.txt
gets served properly.
Why is certbot not creating the needed file?
According to this command, nothing gets created there.
watch -n 0.5 ls -a /var/www/certbot
My domain is: dev.satrimono.com
I ran this command: certbot --nginx --webroot-path /var/www/certbot -d dev.satrimono.com
It produced this output: Invalid response from http://dev.satrimono.com/.well-known/acme-challenge/eSVrXetc
My web server is (include version): nginx/1.22.1
The operating system my web server runs on is (include version): Debian 6.1.85-1
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): 2.1.0