summaryrefslogtreecommitdiffstats
path: root/nginx
diff options
context:
space:
mode:
authorJohannes Löthberg <johannes@kyriasis.com>2019-03-21 19:39:37 +0100
committerJohannes Löthberg <johannes@kyriasis.com>2019-03-21 19:39:37 +0100
commit5c5f1353c2e41949a9a9b6d089bdb3b37a496997 (patch)
treefbda1e13e313eeb836a40cb1dce0f7fc69ccdd2f /nginx
parent4d4e648cab79a876c4d58e3b319424444df6364c (diff)
downloadpillar-5c5f1353c2e41949a9a9b6d089bdb3b37a496997.tar.xz
Proxy matrix
Signed-off-by: Johannes Löthberg <johannes@kyriasis.com>
Diffstat (limited to 'nginx')
-rw-r--r--nginx/matrix_kyriasis_com.sls15
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: