From 76210a217c192bd832a2c57836f7a29c7b6c8908 Mon Sep 17 00:00:00 2001 From: William Carroll Date: Thu, 19 Mar 2020 12:39:07 +0000 Subject: Attempt to serve sandbox.wpcarro.dev/covid-19 Right now my website is serving at sandbox.wpcarro.dev, but I would rather people view it at sandbox.wpcarro.dev/covid-19. I previously tried to accomplish this with the following Nginx configuration: ```nix locations."/covid-19" = { root = briefcase.covid-uk; } ``` I am now trying `alias = ...` instead of `root = ...`. I got the idea from this SO question, https://stackoverflow.com/questions/10631933/nginx-static-file-serving-confusion-with-root-alias. --- nixos/socrates/configuration.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'nixos') diff --git a/nixos/socrates/configuration.nix b/nixos/socrates/configuration.nix index e9fdfe6ca9..e3baf3fbdc 100644 --- a/nixos/socrates/configuration.nix +++ b/nixos/socrates/configuration.nix @@ -167,7 +167,9 @@ in { "sandbox.wpcarro.dev" = { addSSL = true; enableACME = true; - root = briefcase.covid-uk; + locations."/covid-19/" = { + alias = "${briefcase.covid-uk}/"; + }; }; }; }; -- cgit 1.4.1