From e4123759f50b815a56a4dc3f9f759456d5955b97 Mon Sep 17 00:00:00 2001 From: Colin Date: Tue, 19 Dec 2023 00:12:27 +0000 Subject: [PATCH] nginx: only auto-index /share --- hosts/by-name/servo/services/nginx.nix | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/hosts/by-name/servo/services/nginx.nix b/hosts/by-name/servo/services/nginx.nix index c5cc26cc..fcc6e177 100644 --- a/hosts/by-name/servo/services/nginx.nix +++ b/hosts/by-name/servo/services/nginx.nix @@ -72,9 +72,15 @@ in tryFiles = "$uri $uri/ @fallback"; }; - # uninsane.org/share/foo => /var/www/sites/uninsane.org/share/foo. + # unversioned files locations."@fallback" = { root = "/var/www/sites/uninsane.org"; + }; + + # uninsane.org/share/foo => /var/www/sites/uninsane.org/share/foo. + # special-cased to enable directory listings + locations."/share" = { + root = "/var/www/sites/uninsane.org"; extraConfig = '' # autoindex => render directory listings autoindex on;