about summary refs log tree commit diff
path: root/nixos/socrates/configuration.nix
diff options
context:
space:
mode:
authorWilliam Carroll <wpcarro@gmail.com>2020-03-19T12·39+0000
committerWilliam Carroll <wpcarro@gmail.com>2020-03-19T12·48+0000
commit76210a217c192bd832a2c57836f7a29c7b6c8908 (patch)
tree322e2ea2f0b6b1396e3f22387b1d54176835832c /nixos/socrates/configuration.nix
parent380a6a352c6fe0a5fb4859366ae937129a728f8c (diff)
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.
Diffstat (limited to 'nixos/socrates/configuration.nix')
-rw-r--r--nixos/socrates/configuration.nix4
1 files changed, 3 insertions, 1 deletions
diff --git a/nixos/socrates/configuration.nix b/nixos/socrates/configuration.nix
index e9fdfe6ca915..e3baf3fbdc93 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}/";
+        };
       };
     };
   };