From 0530526f816c75620c8067db668a52cf8a205a1f Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Tue, 5 Dec 2017 23:42:35 +0100 Subject: listen for plain webdav --- custom/ymir-nginx.nix | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/custom/ymir-nginx.nix b/custom/ymir-nginx.nix index 701a1108..b61c448c 100644 --- a/custom/ymir-nginx.nix +++ b/custom/ymir-nginx.nix @@ -175,8 +175,6 @@ in { listen [::]:443 ssl; server_name ~^(.*\.)?bragi\.(yggdrasil\.li|141\.li)$; - include ${acme}; - location / { auth_basic "Reverse proxy to bragi"; auth_basic_user_file /srv/www/bragi/htpasswd; @@ -186,6 +184,8 @@ in { } server { + listen *:80; + listen [::]:80; listen *:443 ssl; listen [::]:443 ssl; @@ -194,6 +194,10 @@ in { include ${acme}; location ~ ^/(.+?)(/.*)?$ { + if ($scheme = http) { + return 301 https://$server_name$request_uri; + } + alias /srv/www/webdav/$1$2; autoindex on; -- cgit v1.2.3