From 5c5f1353c2e41949a9a9b6d089bdb3b37a496997 Mon Sep 17 00:00:00 2001 From: Johannes Löthberg Date: Thu, 21 Mar 2019 19:39:37 +0100 Subject: Proxy matrix MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Johannes Löthberg --- nginx/matrix_kyriasis_com.sls | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/nginx/matrix_kyriasis_com.sls b/nginx/matrix_kyriasis_com.sls index 08ed7af..f53a1c9 100644 --- a/nginx/matrix_kyriasis_com.sls +++ b/nginx/matrix_kyriasis_com.sls @@ -5,6 +5,9 @@ nginx: matrix.kyriasis.com: enabled: True config: + - upstream matrix_backend: + - server: 127.0.0.1:8443 + - upstream synapse_metrics: - server: 127.0.0.1:9091 @@ -55,6 +58,12 @@ nginx: - location /: - return: 301 https://riot.kyriasis.com + - location /_matrix: + - proxy_pass: https://matrix_backend + - proxy_buffering: "off" + - proxy_set_header: X-Forwarded-For $remote_addr + - proxy_set_header: Host $host + - location /_synapse: - proxy_pass: http://synapse_metrics - proxy_buffering: "off" @@ -66,7 +75,9 @@ nginx: - root: /srv/http/ - location /.well-known/matrix/client: - - default_type: application/json - - return: '200 "{\"m.homeserver\": {\"base_url\": \"https://matrix.kyriasis.com:8448/\"}}"' + - proxy_pass: https://matrix_backend + - proxy_buffering: "off" + - proxy_set_header: X-Forwarded-For $remote_addr + - proxy_set_header: Host $host # vim: ft=yaml et: -- cgit v1.2.3-54-g00ecf