forked from fi/nix-infra
Add janky nginx config with workaround for proxy protocol
This commit is contained in:
parent
ade955bdf4
commit
ecfe325c9c
14 changed files with 343 additions and 281 deletions
32
hosts/web-public-2/virtualHosts/nekover.se.nix
Normal file
32
hosts/web-public-2/virtualHosts/nekover.se.nix
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
{ ... }:
|
||||
{
|
||||
services.nginx.virtualHosts."nekover.se" = {
|
||||
forceSSL = true;
|
||||
enableACME = true;
|
||||
listen = [
|
||||
{
|
||||
addr = "0.0.0.0";
|
||||
port = 80;
|
||||
}
|
||||
{
|
||||
addr = "localhost";
|
||||
port = 8443;
|
||||
ssl = true;
|
||||
proxyProtocol = true;
|
||||
}
|
||||
];
|
||||
locations."/.well-known/matrix/server" = {
|
||||
return = "200 '{\"m.server\": \"matrix.nekover.se:443\"}'";
|
||||
extraConfig = ''
|
||||
add_header Content-Type application/json;
|
||||
'';
|
||||
};
|
||||
locations."/.well-known/matrix/client" = {
|
||||
return = "200 '{\"m.homeserver\": {\"base_url\": \"https://matrix.nekover.se\"}, \"m.identity_server\": {\"base_url\": \"https://vector.im\"}}'";
|
||||
extraConfig = ''
|
||||
default_type application/json;
|
||||
add_header Access-Control-Allow-Origin *;
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue