alias also without trailing slash
Some checks failed
Test Nix flake / Test nix flake (push) Has been cancelled
Some checks failed
Test Nix flake / Test nix flake (push) Has been cancelled
This commit is contained in:
parent
dfc263a781
commit
f4bbbf7a64
1 changed files with 15 additions and 9 deletions
|
|
@ -2,6 +2,12 @@
|
|||
|
||||
let
|
||||
# TODO: mkVHost
|
||||
aliasDir = url: path: {
|
||||
"${url}" = {
|
||||
return = "301 ${url}/";
|
||||
};
|
||||
"${url}/".alias = "${path}/";
|
||||
};
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
|
|
@ -42,14 +48,6 @@ in
|
|||
index = "index.html";
|
||||
tryFiles = "$uri $uri/ $uri.html =404";
|
||||
};
|
||||
"/twentyyears/".alias = "/srv/http/twentyyears/";
|
||||
"/thirtytwoyears/".alias = "/srv/http/thirtytwoyears/";
|
||||
"/kik/".alias = "/srv/http/kik/";
|
||||
# RFC8805
|
||||
"/noc/".alias = "/srv/http/noc/";
|
||||
"/static/".alias = "/srv/http/static/";
|
||||
# RFC8805 new location
|
||||
"/.well-known/loc/".alias = "/srv/http/noc/";
|
||||
"= /.well-known/security.txt" = {
|
||||
alias = "/srv/http/security.txt";
|
||||
extraConfig = ''
|
||||
|
|
@ -91,7 +89,15 @@ in
|
|||
default_type text/calendar;
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
// aliasDir "/twentyyears" "/srv/http/twentyyears"
|
||||
// aliasDir "/thirtytwoyears" "/srv/http/thirtytwoyears"
|
||||
// aliasDir "/kik" "/srv/http/kik"
|
||||
# RFC8805
|
||||
// aliasDir "/noc" "/srv/http/noc"
|
||||
// aliasDir "/static" "/srv/http/static"
|
||||
# RFC8805 new location
|
||||
// aliasDir "/.well-known/loc" "/srv/http/noc";
|
||||
};
|
||||
"staging.${config.networking.domain}" = {
|
||||
quic = true;
|
||||
|
|
|
|||
Loading…
Reference in a new issue