Mi server is neither configured for IPv6 nor has any AAAA record:
server {
listen 80 default_server;
location ^~ /.well-known/ {
default_type "text/plain";
root /var/www/letsencrypt;
}
}
# dig +short A subdom.mydomain.com
172.104.140.XXX
# dig +short A subdom.mydomain.com
(nothing)
# curl -i4 'http://subdom.mydomain.com/.well-known/existing-folder/existing-test.txt'
HTTP/1.1 200 OK
# curl -i4 'http://subdom.mydomain.com/.well-known/existing-folder/existing-test.txt
curl: (6) Could not resolve host: subdom.mydomain.com
I suspect It is not creating temporary files on acme-challenge directory because I am trying F5 (reloading) directory while renewing certs and ANY of file is created for any moment.
So… why have invalid response by using cerbot renew --dry-run ?
Well, it’s hard to say without seeing your existing renewal parameters or Certbot logs, but that location block doesn’t look like it would work, since Certbot’s webroot plugin expects to place files in the /.well-known/acme-challenge directory, not the /.well-known/ directory.
The simplest thing to do is just to allow Certbot to figure out the nginx directives by using the nginx plugin:
I have another working server with 0.19 version and when I am trying to renew certificates, the temp files are created and deleted as normal behaviour on the acme-challenge directory. In my no-working server the temp files are not created on the acme-challenge directory. Why?
Post your unredacted renewal parameters from /etc/letsencrypt/renewal/*.conf and it’ll probably become clear. My suspicion is on your location block not mapping properly onto the webroot anticipated by Certbot, but there’s insufficient evidence to be sure.