diff options
author | Dominique Martinet @ jormungand <asmadeus@codewreck.org> | 2020-05-22 16:55:26 +0200 |
---|---|---|
committer | Dominique Martinet @ jormungand <asmadeus@codewreck.org> | 2020-05-22 16:56:24 +0200 |
commit | 08b7675fbef2b84903d9ddc6c2ee04229731c7f9 (patch) | |
tree | 3d7c60178ca0706c6656ab4087ee87cfc91c7162 /machines/jormungand | |
parent | e96b0b2af3b1411e968231e3234f6b966db4647a (diff) |
jormungand nginx: move mpd to /mpd, add basic directory for jormungand.codewreck.org vhost
Diffstat (limited to 'machines/jormungand')
-rw-r--r-- | machines/jormungand/nginx.nix | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/machines/jormungand/nginx.nix b/machines/jormungand/nginx.nix index ca55979..390df14 100644 --- a/machines/jormungand/nginx.nix +++ b/machines/jormungand/nginx.nix @@ -3,19 +3,26 @@ { imports = [ ../../profiles/nginx.nix ]; + systemd.services.nginx = { + serviceConfig.BindReadOnlyPaths = [ "/home/asmadeus/www:/www" ]; + }; + services.nginx.virtualHosts = { "jormungand.codewreck.org" = { forceSSL = true; enableACME = true; - locations."/" = { + locations."/mpd/" = { proxyPass = "http://127.0.0.1:8080"; + # /var/spool/nginx/mpd.htpasswd has been populated manually + # until proper secrets get managed... + extraConfig = '' + auth_basic "mpd"; + auth_basic_user_file /var/spool/nginx/mpd.htpasswd; + ''; + }; + locations."/" = { + root = "/www"; }; - # /var/spool/nginx/mpd.htpasswd has been populated manually - # until proper secrets get managed... - extraConfig = '' - auth_basic "mpd"; - auth_basic_user_file /var/spool/nginx/mpd.htpasswd; - ''; }; "matrix.codewreck.org" = { |