summaryrefslogtreecommitdiff
path: root/config/web-server.nix
diff options
context:
space:
mode:
Diffstat (limited to 'config/web-server.nix')
-rw-r--r--config/web-server.nix16
1 files changed, 16 insertions, 0 deletions
diff --git a/config/web-server.nix b/config/web-server.nix
index eb957a5..5f1ae53 100644
--- a/config/web-server.nix
+++ b/config/web-server.nix
@@ -12,6 +12,9 @@
networking.firewall.allowedTCPPorts = [ 80 443 ];
services.nginx = {
enable = true;
+ package = pkgs.nginxStable.override {
+ modules = with pkgs.nginxModules; [ dav ];
+ };
recommendedProxySettings = true;
appendHttpConfig = ''
# This is a workaround to deal with closed connections on
@@ -60,6 +63,19 @@
locations."/mpd" = {
proxyPass = "http://${mpd_loc.address}:${toString mpd_loc.port}/";
};
+ locations."/dav" = {
+ root = "/storage/srv/kj.orbekk.com";
+ extraConfig = ''
+ auth_basic webdav;
+ # htpasswd -c /opt/secret/nginx-webdav.htpasswd
+ dav_ext_methods PROPFIND OPTIONS;
+ auth_basic_user_file "/opt/secret/nginx-webdav.htpasswd";
+ dav_methods put delete mkcol copy move;
+ dav_access user:rw group:rw all:rw;
+ create_full_put_path on;
+ autoindex on;
+ '';
+ };
#locations."/systemd" = {
# proxyPass = "http://10.0.20.15:11105/";
#};