diff options
Diffstat (limited to 'nginx')
-rw-r--r-- | nginx/matrix_kyriasis_com.sls | 15 |
1 files 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: |