bekkalokk/well-known: reply to well-known for all domains

This commit is contained in:
h7x4
2026-01-21 14:47:31 +09:00
parent 9eb5cd869a
commit ebd40fc2d7

View File

@@ -1,18 +1,25 @@
{ ... }: { lib, ... }:
{ {
services.nginx.virtualHosts."www.pvv.ntnu.no".locations = { services.nginx.virtualHosts = lib.genAttrs [
"^~ /.well-known/" = { "pvv.ntnu.no"
alias = (toString ./root) + "/"; "www.pvv.ntnu.no"
}; "pvv.org"
"www.pvv.org"
] (_: {
locations = {
"^~ /.well-known/" = {
alias = (toString ./root) + "/";
};
# Proxy the matrix well-known files # Proxy the matrix well-known files
# Host has be set before proxy_pass # Host has be set before proxy_pass
# The header must be set so nginx on the other side routes it to the right place # The header must be set so nginx on the other side routes it to the right place
"^~ /.well-known/matrix/" = { "^~ /.well-known/matrix/" = {
extraConfig = '' extraConfig = ''
proxy_set_header Host matrix.pvv.ntnu.no; proxy_set_header Host matrix.pvv.ntnu.no;
proxy_pass https://matrix.pvv.ntnu.no/.well-known/matrix/; proxy_pass https://matrix.pvv.ntnu.no/.well-known/matrix/;
''; '';
};
}; };
}; });
} }