change ese web root
This commit is contained in:
parent
9662b35f42
commit
7c86415c50
|
@ -1,6 +1,7 @@
|
||||||
{ config, ... }:
|
{ config, ... }:
|
||||||
let
|
let
|
||||||
domain = "ese.${config.networking.domain}";
|
domain = "ese.${config.networking.domain}";
|
||||||
|
webRoot = "/srv/web/ese";
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
services.nginx = {
|
services.nginx = {
|
||||||
|
@ -10,12 +11,12 @@ in
|
||||||
return = "302 /2024/";
|
return = "302 /2024/";
|
||||||
};
|
};
|
||||||
locations."/" = {
|
locations."/" = {
|
||||||
root = "/srv/web/ese/served";
|
root = webRoot;
|
||||||
tryFiles = "$uri $uri/ =404";
|
tryFiles = "$uri $uri/ =404";
|
||||||
};
|
};
|
||||||
# cache static assets
|
# cache static assets
|
||||||
locations."~* \.(?:css|svg|webp|jpg|jpeg|gif|png|ico|mp4|mp3|ogg|ogv|webm|ttf|woff2|woff)$" = {
|
locations."~* \.(?:css|svg|webp|jpg|jpeg|gif|png|ico|mp4|mp3|ogg|ogv|webm|ttf|woff2|woff)$" = {
|
||||||
root = "/srv/web/ese/served";
|
root = webRoot;
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
expires 1y;
|
expires 1y;
|
||||||
'';
|
'';
|
||||||
|
|
Loading…
Reference in a new issue