From 9491ee71c04d82ab026702d28c5f9ed67aba80d7 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Tue, 5 Dec 2017 23:20:26 +0100 Subject: Replace ftp with webdav --- custom/ymir-nginx.nix | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'custom') diff --git a/custom/ymir-nginx.nix b/custom/ymir-nginx.nix index a1de81c3..96633f00 100644 --- a/custom/ymir-nginx.nix +++ b/custom/ymir-nginx.nix @@ -184,6 +184,28 @@ in { proxy_pass http://bragi.asgard.yggdrasil/; } } + + server { + listen *:443 ssl; + listen [::]:443 ssl; + + server_name ~^webdav\.(yggdrasil\.li|141\.li|praseodym\.org)$; + + include ${acme}; + + location ~ ^/(.+?)(/.*)?$ { + alias /home/$1/webdav$2; + autoindex on; + + auth_basic "WebDAV user directory of $1"; + auth_basic_user_file /home/$1/webdav.htpasswd; + + client_body_temp_path /tmp/webdav.$1; + dav_methods PUT DELETE MKCOL COPY MOVE; + create_full_put_path on; + dav_access user:rw group:r all:r; + } + } ''; }; } -- cgit v1.2.3