From 4f648fba079793a3217add9fccb3bedb35f7be37 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Tue, 17 Sep 2019 16:40:22 +0800 Subject: [PATCH] nixbld: fix nginx alias_traversal configuration issue https://github.com/yandex/gixy/blob/master/docs/en/plugins/aliastraversal.md --- nixbld-etc-nixos/configuration.nix | 32 +++++++++++++++--------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/nixbld-etc-nixos/configuration.nix b/nixbld-etc-nixos/configuration.nix index d6b7e0f..1596171 100644 --- a/nixbld-etc-nixos/configuration.nix +++ b/nixbld-etc-nixos/configuration.nix @@ -307,8 +307,8 @@ ACTION=="add", SUBSYSTEM=="tty", \ locations."^~ /js/".extraConfig = '' expires 60d; ''; - locations."/MathJax" = { - alias = "/var/www/MathJax"; + locations."/MathJax/" = { + alias = "/var/www/MathJax/"; extraConfig = '' expires 60d; ''; @@ -329,25 +329,25 @@ ACTION=="add", SUBSYSTEM=="tty", \ ''; # autogenerated ARTIQ manuals - locations."/artiq/manual-beta" = { - alias = "${hydraWwwOutputs}/artiq-manual-html-beta/share/doc/artiq-manual/html"; + locations."/artiq/manual-beta/" = { + alias = "${hydraWwwOutputs}/artiq-manual-html-beta/share/doc/artiq-manual/html/"; }; - locations."/artiq/manual-beta.pdf" = { + locations."=/artiq/manual-beta.pdf" = { alias = "${hydraWwwOutputs}/artiq-manual-latexpdf-beta/share/doc/artiq-manual/ARTIQ.pdf"; }; # legacy content - locations."/migen/manual" = { - alias = "/var/www/m-labs.hk.old/migen/manual"; + locations."/migen/manual/" = { + alias = "/var/www/m-labs.hk.old/migen/manual/"; }; - locations."/artiq/manual" = { - alias = "/var/www/m-labs.hk.old/artiq/manual-release-4"; + locations."/artiq/manual/" = { + alias = "/var/www/m-labs.hk.old/artiq/manual-release-4/"; }; - locations."/artiq/manual-release-4" = { - alias = "/var/www/m-labs.hk.old/artiq/manual-release-4"; + locations."/artiq/manual-release-4/" = { + alias = "/var/www/m-labs.hk.old/artiq/manual-release-4/"; }; - locations."/artiq/manual-release-3" = { - alias = "/var/www/m-labs.hk.old/artiq/manual-release-3"; + locations."/artiq/manual-release-3/" = { + alias = "/var/www/m-labs.hk.old/artiq/manual-release-3/"; }; }; in { @@ -356,7 +356,7 @@ ACTION=="add", SUBSYSTEM=="tty", \ "lab.m-labs.hk" = { addSSL = true; useACMEHost = "nixbld.m-labs.hk"; - locations."/munin".alias = "/var/www/munin"; + locations."/munin/".alias = "/var/www/munin/"; locations."/munin".extraConfig = '' auth_basic "Munin"; auth_basic_user_file /etc/nixos/secret/muninpasswd; @@ -371,8 +371,8 @@ ACTION=="add", SUBSYSTEM=="tty", \ "conda.m-labs.hk" = { forceSSL = true; useACMEHost = "nixbld.m-labs.hk"; - locations."/artiq-beta" = { - alias = "${hydraWwwOutputs}/artiq-conda-channel-beta"; + locations."/artiq-beta/" = { + alias = "${hydraWwwOutputs}/artiq-conda-channel-beta/"; extraConfig = '' autoindex on; index bogus_index_file;