Disable auth for certbot webroot challenge.

This commit is contained in:
Brad Treloar 2025-04-26 00:15:20 +09:30
parent a1ee2f85f8
commit 40a91f6d66
4 changed files with 21 additions and 1 deletions

View file

@ -2,8 +2,15 @@ server {
listen 80 default_server;
root "/usr/share/nginx/html";
error_page 404 404.html;
location / {
auth_basic "Restricted";
auth_basic_user_file auth.htpasswd;
}
# Disable authentication for certbot challenge dir.
location /.well-known/acme-challenge/ {
auth_basic off;
}
}