diff options
author | Kjetil Ørbekk <kj@orbekk.com> | 2020-09-01 08:01:21 -0400 |
---|---|---|
committer | Kjetil Ørbekk <kj@orbekk.com> | 2020-09-01 08:01:21 -0400 |
commit | 3389cdb4e14732c21bc6b22336fd29cbb5200060 (patch) | |
tree | 0902edfb9f45be5a03089a379e6b49a1a22ae300 /config | |
parent | 2379389b9a08e1c28cb138f004ce536b13d74a02 (diff) |
webdav setup
Diffstat (limited to 'config')
-rw-r--r-- | config/minecraft.nix | 2 | ||||
-rw-r--r-- | config/web-server.nix | 16 |
2 files changed, 17 insertions, 1 deletions
diff --git a/config/minecraft.nix b/config/minecraft.nix index c712503..8e6ad0c 100644 --- a/config/minecraft.nix +++ b/config/minecraft.nix @@ -3,7 +3,7 @@ let minecraft-port = 25565; allowedAddresses = [ "108.30.16.212" - "24.193.7.10" + "24.193.7.0/24" ]; in { 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/"; #}; |