From 46ab8660768b1d6958848531c1735a973073ca8e Mon Sep 17 00:00:00 2001 From: Gabriel Ebner Date: Sat, 5 Dec 2015 13:59:38 +0100 Subject: [PATCH] nginx: fix letsencrypt redirect --- mastus/gogs.nix | 4 +++- mastus/www.nix | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/mastus/gogs.nix b/mastus/gogs.nix index ef4ca5e..3eccbe1 100644 --- a/mastus/gogs.nix +++ b/mastus/gogs.nix @@ -83,7 +83,9 @@ in alias /etc/sslcerts/acmeroot/.well-known/acme-challenge; } - rewrite ^(.*) https://$host$1 permanent; + location / { + rewrite ^(.*) https://$host$1 permanent; + } } server { diff --git a/mastus/www.nix b/mastus/www.nix index 5493e47..ceda151 100644 --- a/mastus/www.nix +++ b/mastus/www.nix @@ -26,7 +26,9 @@ alias /etc/sslcerts/acmeroot/.well-known/acme-challenge; } - rewrite ^(.*) https://gebner.org$1 permanent; + location / { + rewrite ^(.*) https://gebner.org$1 permanent; + } } ''; };