From 1abd6bd06deb662ade68c594d3214f54d946eaf8 Mon Sep 17 00:00:00 2001 From: nyanloutre Date: Tue, 14 May 2024 17:39:41 +0200 Subject: [PATCH] fix webdav server --- systems/LoutreOS/web.nix | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/systems/LoutreOS/web.nix b/systems/LoutreOS/web.nix index 0d3aacd..9fda161 100644 --- a/systems/LoutreOS/web.nix +++ b/systems/LoutreOS/web.nix @@ -302,14 +302,17 @@ in # }; "drive.nyanlout.re" = base { "/" = { - index = "/index.php"; extraConfig = '' fastcgi_split_path_info ^(.+\.php)(/.+)$; fastcgi_pass unix:${config.services.phpfpm.pools.drive.socket}; include ${pkgs.nginx}/conf/fastcgi_params; include ${pkgs.nginx}/conf/fastcgi.conf; - - client_max_body_size 0; + fastcgi_param SCRIPT_FILENAME $document_root/index.php; + fastcgi_intercept_errors on; + fastcgi_buffers 64 4K; + client_body_temp_path /mnt/webdav/tmp_upload; + client_max_body_size 0; + proxy_request_buffering off; ''; }; } // { @@ -415,6 +418,12 @@ in ]; }; + systemd.services.phpfpm-drive.serviceConfig = { + ReadWritePaths = [ + "/mnt/webdav" + ]; + }; + systemd.services.nextcloud-setup.serviceConfig = { LoadCredential = "nextcloud_admin.pass:/mnt/secrets/nextcloud_admin.pass"; };