nixos/nginx: skip adding a comment to acmeLocation in nginx configuration
This commit is contained in:
parent
7f1b6d45af
commit
ae5c0c1521
1 changed files with 2 additions and 1 deletions
|
@ -352,10 +352,11 @@ let
|
||||||
|
|
||||||
# The acme-challenge location doesn't need to be added if we are not using any automated
|
# The acme-challenge location doesn't need to be added if we are not using any automated
|
||||||
# certificate provisioning and can also be omitted when we use a certificate obtained via a DNS-01 challenge
|
# certificate provisioning and can also be omitted when we use a certificate obtained via a DNS-01 challenge
|
||||||
acmeLocation = optionalString (vhost.enableACME || (vhost.useACMEHost != null && config.security.acme.certs.${vhost.useACMEHost}.dnsProvider == null)) ''
|
acmeLocation = optionalString (vhost.enableACME || (vhost.useACMEHost != null && config.security.acme.certs.${vhost.useACMEHost}.dnsProvider == null))
|
||||||
# Rule for legitimate ACME Challenge requests (like /.well-known/acme-challenge/xxxxxxxxx)
|
# Rule for legitimate ACME Challenge requests (like /.well-known/acme-challenge/xxxxxxxxx)
|
||||||
# We use ^~ here, so that we don't check any regexes (which could
|
# We use ^~ here, so that we don't check any regexes (which could
|
||||||
# otherwise easily override this intended match accidentally).
|
# otherwise easily override this intended match accidentally).
|
||||||
|
''
|
||||||
location ^~ /.well-known/acme-challenge/ {
|
location ^~ /.well-known/acme-challenge/ {
|
||||||
${optionalString (vhost.acmeFallbackHost != null) "try_files $uri @acme-fallback;"}
|
${optionalString (vhost.acmeFallbackHost != null) "try_files $uri @acme-fallback;"}
|
||||||
${optionalString (vhost.acmeRoot != null) "root ${vhost.acmeRoot};"}
|
${optionalString (vhost.acmeRoot != null) "root ${vhost.acmeRoot};"}
|
||||||
|
|
Loading…
Reference in a new issue