From c75e337d62dcb2baca0c5e347d895ecda2f10b6a Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Tue, 5 Dec 2017 23:48:27 +0100 Subject: =?UTF-8?q?=E2=80=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- custom/ymir-nginx.nix | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/custom/ymir-nginx.nix b/custom/ymir-nginx.nix index 31fa74f4..ca14b8e8 100644 --- a/custom/ymir-nginx.nix +++ b/custom/ymir-nginx.nix @@ -186,18 +186,19 @@ in { server { listen *:80; listen [::]:80; - listen *:443 ssl; - listen [::]:443 ssl; server_name ~^webdav\.(yggdrasil\.li|141\.li|praseodym\.org)$; include ${acme}; + } - location ~ ^/(.+?)(/.*)?$ { - if ($scheme = 'http') { - rewrite ^ https://$host$request_uri? permanent; - } + server { + listen *:443 ssl; + listen [::]:443 ssl; + server_name ~^webdav\.(yggdrasil\.li|141\.li|praseodym\.org)$; + + location ~ ^/(.+?)(/.*)?$ { alias /srv/www/webdav/$1$2; autoindex on; -- cgit v1.2.3