diff options
author | Tristan Helmich <tristan.helmich@gmail.com> | 2016-01-26 14:29:30 +0100 |
---|---|---|
committer | Robin Gloster <mail@glob.in> | 2016-07-28 11:59:13 +0000 |
commit | 900b311a386b82ab66f209c1b9d4c292af08d6dc (patch) | |
tree | 38d1a4231923589a99e3073a505bd1793d545f16 /nixos | |
parent | 4676983990b1d35676eba19cee9e24a16e0f60d7 (diff) | |
download | nixlib-900b311a386b82ab66f209c1b9d4c292af08d6dc.tar nixlib-900b311a386b82ab66f209c1b9d4c292af08d6dc.tar.gz nixlib-900b311a386b82ab66f209c1b9d4c292af08d6dc.tar.bz2 nixlib-900b311a386b82ab66f209c1b9d4c292af08d6dc.tar.lz nixlib-900b311a386b82ab66f209c1b9d4c292af08d6dc.tar.xz nixlib-900b311a386b82ab66f209c1b9d4c292af08d6dc.tar.zst nixlib-900b311a386b82ab66f209c1b9d4c292af08d6dc.zip |
nginx module: Fix ACME extraDomains, fix challenge url to not redirect to allow renewals
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/modules/services/web-servers/nginx/default.nix | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/nixos/modules/services/web-servers/nginx/default.nix b/nixos/modules/services/web-servers/nginx/default.nix index a84a3c9f2a2a..fb3f554bbf25 100644 --- a/nixos/modules/services/web-servers/nginx/default.nix +++ b/nixos/modules/services/web-servers/nginx/default.nix @@ -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; |