add conduwuit matrix server
This commit is contained in:
parent
c1352fdd88
commit
877e806b3a
8 changed files with 205 additions and 0 deletions
45
hosts/cloud/proxy/conduwuit.nix
Normal file
45
hosts/cloud/proxy/conduwuit.nix
Normal file
|
@ -0,0 +1,45 @@
|
|||
{ self, ... }:
|
||||
let
|
||||
proxy-conf = ''
|
||||
client_max_body_size 50M;
|
||||
proxy_buffering off;
|
||||
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_set_header Access-Control-Allow-Origin *;
|
||||
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
|
||||
proxy_read_timeout 600s;
|
||||
proxy_send_timeout 600s;
|
||||
send_timeout 600s;
|
||||
'';
|
||||
|
||||
in
|
||||
{
|
||||
services.nginx.upstreams.conduwuit = {
|
||||
servers = {
|
||||
"10.89.88.16:6167" = { };
|
||||
"[fd31:185d:722f::16]:6167" = { };
|
||||
};
|
||||
};
|
||||
|
||||
services.nginx.virtualHosts."oxapentane.com" = {
|
||||
locations."/_matrix/" = {
|
||||
proxyPass = "http://conduwuit$request_uri";
|
||||
extraConfig = proxy-conf;
|
||||
};
|
||||
locations."/_conduwuit/" = {
|
||||
proxyPass = "http://conduwuit$request_uri";
|
||||
extraConfig = proxy-conf;
|
||||
};
|
||||
locations."/.well-known/matrix" = {
|
||||
proxyPass = "http://conduwuit$request_uri";
|
||||
extraConfig = proxy-conf;
|
||||
};
|
||||
};
|
||||
}
|
|
@ -5,6 +5,7 @@ in
|
|||
{
|
||||
imports = [
|
||||
./auth.nix
|
||||
./conduwuit.nix
|
||||
./dav.nix
|
||||
./git.nix
|
||||
./immich.nix
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue