nginx module: Fix ACME extraDomains, fix challenge url to not redirect to allow renewals
This commit is contained in:
parent
4676983990
commit
900b311a38
@ -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;
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user