From 5b3c59bf26ff8b9c38f3ca78451b42ad0014a585 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Mon, 7 Nov 2022 22:43:26 +0100 Subject: ... --- hosts/surtr/http/webdav/default.nix | 54 ++++++++++++++++++------------------- 1 file changed, 27 insertions(+), 27 deletions(-) (limited to 'hosts/surtr') diff --git a/hosts/surtr/http/webdav/default.nix b/hosts/surtr/http/webdav/default.nix index 5f2955bc..1da411d3 100644 --- a/hosts/surtr/http/webdav/default.nix +++ b/hosts/surtr/http/webdav/default.nix @@ -26,14 +26,14 @@ in { account sufficient pam_unix.so quiet ''; users.groups."webdav" = {}; - + services.nginx = { - upstreams."py-webdav" = { - servers = { - "unix://${webdavSocket}" = {}; - }; - }; - + # upstreams."py-webdav" = { + # servers = { + # "unix://${webdavSocket}" = {}; + # }; + # }; + virtualHosts."webdav.141.li" = { forceSSL = true; sslCertificate = "/run/credentials/nginx.service/webdav.141.li.pem"; @@ -41,19 +41,19 @@ in { sslTrustedCertificate = "/run/credentials/nginx.service/webdav.141.li.chain.pem"; locations = { "/".extraConfig = '' - root /srv/files/$remote_user; + root /srv/files/$remote_user; auth_pam "WebDAV"; auth_pam_service_name "webdav"; ''; - "/py/".extraConfig = '' - rewrite ^/py(.*) $1 break; + # "/py/".extraConfig = '' + # rewrite ^/py(.*) $1 break; - include ${config.services.nginx.package}/conf/uwsgi_params; - uwsgi_param SCRIPT_NAME /py; - uwsgi_pass py-webdav; - ''; + # include ${config.services.nginx.package}/conf/uwsgi_params; + # uwsgi_param SCRIPT_NAME /py; + # uwsgi_pass py-webdav; + # ''; }; extraConfig = '' dav_methods PUT DELETE MKCOL COPY MOVE; @@ -83,18 +83,18 @@ in { ]; - services.uwsgi.instance.vassals.webdav = { - type = "normal"; - socket = webdavSocket; - listen = 1024; - master = true; - vacuum = true; - chown-socket = "${config.services.nginx.user}:${config.services.uwsgi.group}"; - - plugins = ["python3"]; - pythonPackages = self: [webdavApp]; - module = "webdav"; - callable = "app"; - }; + # services.uwsgi.instance.vassals.webdav = { + # type = "normal"; + # socket = webdavSocket; + # listen = 1024; + # master = true; + # vacuum = true; + # chown-socket = "${config.services.nginx.user}:${config.services.uwsgi.group}"; + + # plugins = ["python3"]; + # pythonPackages = self: [webdavApp]; + # module = "webdav"; + # callable = "app"; + # }; }; } -- cgit v1.2.3