nginx module: Fix ACME extraDomains, fix challenge url to not redirect to allow renewals

This commit is contained in:
Tristan Helmich 2016-01-26 14:29:30 +01:00 committed by Robin Gloster
parent 4676983990
commit 900b311a38

View File

@ -85,8 +85,10 @@ let
server_name ${serverName} ${concatStringsSep " " vhost.serverAliases};
${optionalString vhost.enableACME "location /.well-known/acme-challenge { root ${vhost.acmeRoot}; }"}
location / {
return 301 https://$host${optionalString (port != 443) ":${port}"}$request_uri;
}
}
''}
server {
@ -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;