by Avamander · 4y ago · 0 comments
/etc/nginx/letsencrypt.conf:
location /.well-known/acme-challenge {
default_type "text/plain";
try_files $uri $uri/ =404;
root /tmp/letsencrypt-auto;
}
/etc/nginx/sites-enabled/default: server {
[...]
include letsencrypt.conf;
[...]
}
Reload nginx.Invoke certbot for the new domain once with:
certbot certonly --webroot -w /tmp/letsencrypt-auto/ [--must-staple] -d example.comDNS challenges are a bit more seamless, but I personally don't like giving access to entire zones to a single machine. Like most DNS APIs force you to.