mirror of
https://github.com/xiaoxinpro/nginx-proxy-manager-zh.git
synced 2025-01-24 13:48:14 -05:00
18 lines
677 B
Plaintext
18 lines
677 B
Plaintext
# Rule for legitimate ACME Challenge requests (like /.well-known/acme-challenge/xxxxxxxxx)
|
|
# We use ^~ here, so that we don't check other regexes (for speed-up). We actually MUST cancel
|
|
# other regex checks, because in our other config files have regex rule that denies access to files with dotted names.
|
|
location ^~ /.well-known/acme-challenge/ {
|
|
auth_basic off;
|
|
auth_request off;
|
|
allow all;
|
|
default_type "text/plain";
|
|
root "/data/.acme.sh/.well-known";
|
|
}
|
|
|
|
# Hide /acme-challenge subdirectory and return 404 on all requests.
|
|
# It is somewhat more secure than letting Nginx return 403.
|
|
# Ending slash is important!
|
|
location = /.well-known/acme-challenge/ {
|
|
return 404;
|
|
}
|