From e3d98c653799c70c7c834057408731f587c3760f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Motiejus=20Jak=C5=A1tys?= Date: Tue, 17 Jan 2023 12:10:13 +0200 Subject: [PATCH] beta.jakstys.lt with matrix and blog hosting --- configuration.nix | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/configuration.nix b/configuration.nix index b344ad6..f0a51e9 100644 --- a/configuration.nix +++ b/configuration.nix @@ -219,6 +219,32 @@ let ssh_pubkeys = { virtualHosts."git.jakstys.lt".extraConfig = '' reverse_proxy 127.0.0.1:3000 ''; + virtualHosts."beta.jakstys.lt".extraConfig = '' + header /_/* Cache-Control "public, max-age=31536000, immutable" + root * /var/www/jakstys.lt + file_server { + precompressed br gzip + } + + @matrixMatch { + path /.well-known/matrix/client + path /.well-known/matrix/server + } + header @matrixMatch Content-Type application/json + header @matrixMatch Access-Control-Allow-Origin * + header @matrixMatch Cache-Control "public, max-age=3600, immutable" + + handle /.well-known/matrix/client { + respond "{\"m.homeserver\": {\"base_url\": \"https://jakstys.lt\"}}" 200 + } + handle /.well-known/matrix/server { + respond "{\"m.server\": \"jakstys.lt:443\"}" 200 + } + + handle /_matrix/* { + reverse_proxy http://hel1-b.servers.jakst:8088 + } + ''; }; };