Add necessary nginx configs to get matrix federation to work

This commit is contained in:
Jesper Hess 2019-03-05 08:28:53 +01:00
parent 1f8b1827ff
commit fef1951d57
Signed by untrusted user: graffen
GPG key ID: 351A89E40D763F0F
3 changed files with 20 additions and 0 deletions

View file

@ -0,0 +1 @@
listen 8008;

View file

@ -0,0 +1,14 @@
location /_matrix {
proxy_pass http://0.0.0.0:8008;
proxy_set_header X-Forwarded-For $remote_addr;
}
location /.well-known/matrix/server {
default_type application/json;
return 200 '{"m.server": "matrix.data.coop:443"}';
}
location /.well-known/matrix/client {
default_type application/json;
return 200 '{"m.homeserver": {"base_url": "https://matrix.data.coop"}}';
}

View file

@ -31,6 +31,11 @@
src: files/configs/riot/riot.im.conf
dest: "{{ riot.volume_folder }}/data/riot.im.conf"
- name: upload vhost config for root domain
template:
src: files/configs/matrix/vhost-root
dest: "{{ nginx.volume_folder }}/vhost/{{ base_domain }}"
- name: matrix database container
docker_container:
name: matrix_db