ingress-proxy: fix
This commit is contained in:
parent
f3e8b1a5bd
commit
dd2da578a9
1 changed files with 4 additions and 12 deletions
|
@ -1,5 +1,5 @@
|
|||
{ lib, pkgs, ... }: let
|
||||
tsHost = x: "http://${x}.hoki-porgy.ts.net";
|
||||
tsHost = name: port: "http://${name}.hoki-porgy.ts.net:${port}";
|
||||
in {
|
||||
imports = [
|
||||
../../templates/proxmox-lxc.nix
|
||||
|
@ -18,16 +18,8 @@ in {
|
|||
services.nginx = {
|
||||
recommendedTlsSettings = true;
|
||||
|
||||
upstreams = with lib; let
|
||||
upstreamsToCreate = [
|
||||
tsHost "mango"
|
||||
];
|
||||
|
||||
upstreams = listToAttrs (
|
||||
map (x: nameValuePair x ({ servers = [x]; })) upstreamsToCreate
|
||||
);
|
||||
in {
|
||||
inherit upstreams;
|
||||
upstreams = {
|
||||
mango.servers = [ tsHost "mango" 6167 ];
|
||||
};
|
||||
|
||||
virtualHosts = {
|
||||
|
@ -44,7 +36,7 @@ in {
|
|||
];
|
||||
|
||||
locations."/_matrix/" = {
|
||||
proxyPass = "${tsHost "mango"}:6167";
|
||||
proxyPass = "http://mango";
|
||||
proxyWebsockets = true;
|
||||
extraConfig = ''
|
||||
proxy_set_header Host $host;
|
||||
|
|
Loading…
Add table
Reference in a new issue