mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-17 07:13:23 +01:00
nginx module: Fix ACME extraDomains, fix challenge url to not redirect to allow renewals
This commit is contained in:
parent
4676983990
commit
900b311a38
1 changed files with 4 additions and 4 deletions
|
@ -85,7 +85,9 @@ let
|
|||
|
||||
server_name ${serverName} ${concatStringsSep " " vhost.serverAliases};
|
||||
${optionalString vhost.enableACME "location /.well-known/acme-challenge { root ${vhost.acmeRoot}; }"}
|
||||
return 301 https://$host${optionalString (port != 443) ":${port}"}$request_uri;
|
||||
location / {
|
||||
return 301 https://$host${optionalString (port != 443) ":${port}"}$request_uri;
|
||||
}
|
||||
}
|
||||
''}
|
||||
|
||||
|
@ -227,9 +229,7 @@ in
|
|||
|
||||
security.acme.certs = mapAttrs (vhostName: vhostConfig: {
|
||||
webroot = vhostConfig.acmeRoot;
|
||||
extraDomains = genAttrs vhostConfig.serverAliases (alias: {
|
||||
"${alias}" = null;
|
||||
});
|
||||
extraDomains = genAttrs vhostConfig.serverAliases (alias: null);
|
||||
}) virtualHosts;
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue