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};
|
server_name ${serverName} ${concatStringsSep " " vhost.serverAliases};
|
||||||
${optionalString vhost.enableACME "location /.well-known/acme-challenge { root ${vhost.acmeRoot}; }"}
|
${optionalString vhost.enableACME "location /.well-known/acme-challenge { root ${vhost.acmeRoot}; }"}
|
||||||
|
location / {
|
||||||
return 301 https://$host${optionalString (port != 443) ":${port}"}$request_uri;
|
return 301 https://$host${optionalString (port != 443) ":${port}"}$request_uri;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
''}
|
''}
|
||||||
|
|
||||||
server {
|
server {
|
||||||
@ -227,9 +229,7 @@ in
|
|||||||
|
|
||||||
security.acme.certs = mapAttrs (vhostName: vhostConfig: {
|
security.acme.certs = mapAttrs (vhostName: vhostConfig: {
|
||||||
webroot = vhostConfig.acmeRoot;
|
webroot = vhostConfig.acmeRoot;
|
||||||
extraDomains = genAttrs vhostConfig.serverAliases (alias: {
|
extraDomains = genAttrs vhostConfig.serverAliases (alias: null);
|
||||||
"${alias}" = null;
|
|
||||||
});
|
|
||||||
}) virtualHosts;
|
}) virtualHosts;
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user