Add matrix well-known files

Matrix can use some well-known uri's for configuration (rfc 8615).
This commit:
* Sets up fedora.im as a seperate side on proxies that redirects to
  getfedora.org and serves a server and client static matrix file.
* gets fedora.im it's own ssl cert via letsencrypt so it's all valid
  (currently it points to proxies generically and gets the
fedoraproject.org cert)
* Adds config to serve matrix client/server well-known static files for
  fedoraproject.org site.

Note that all the acutal contents of these files are empty for now, but
once our matrix server is up we can fill them in properly and re-run the
playbook. :)

Signed-off-by: Kevin Fenzi <kevin@scrye.com>
This commit is contained in:
Kevin Fenzi 2021-08-30 12:31:26 -07:00 committed by kevin
parent de0b7f9df1
commit 19b66e404b
10 changed files with 64 additions and 0 deletions

View file

@ -63,3 +63,6 @@
- role: fedoraloveskde/website
website: fedoraloveskde.org
- role: fedora-web/fedora.im
website: fedora.im

View file

@ -1092,3 +1092,11 @@
server_aliases: [packages.stg.fedoraproject.org]
sslonly: true
cert_name: "{{wildcard_cert_name}}"
- role: httpd/website
site_name: fedora.im
server_aliases: [stg.fedora.im]
sslonly: true
certbot: true
tags:
- fedora.im

View file

@ -0,0 +1,7 @@
Alias /.well-known/matrix/client /srv/web/fedora.im/.well-known-matrix-client-fedora-im
Alias /.well-known/matrix/server /srv/web/fedora.im/.well-known-matrix-server-fedora-im
DocumentRoot /srv/web/fedora.im/
RewriteEngine On
RewriteRule (.*) https://getfedora.org [NE]

View file

@ -0,0 +1,23 @@
- name: Copy some config files for {{website}}
copy: >
src={{item}} dest=/etc/httpd/conf.d/{{website}}/{{item}}
owner=root group=root mode=0644
with_items:
- matrix.conf
notify:
- reload proxyhttpd
tags:
- fedora-web
- fedora-web/fedora.im
- name: copy in some matrix files
copy: >
src={{item}} dest=/srv/web/fedora.im/{{item}}
owner=root group=root mode=0644
with_items:
- .well-known-matrix-client-fedora-im
- .well-known-matrix-server-fedora-im
tags:
- fedora-web
- fedora-web/fedora.im

View file

@ -0,0 +1,2 @@
Alias /.well-known/matrix/client /srv/web/.well-known-matrix-client-fedoraproject-org
Alias /.well-known/matrix/server /srv/web/.well-known-matrix-server-fedoraproject-org

View file

@ -25,6 +25,7 @@
- expires.conf
- deflate.conf
- mattdm-google-validate.conf
- matrix.conf
notify:
- reload proxyhttpd
tags:
@ -105,3 +106,23 @@
tags:
- fedora-web
- fedora-web/main
# setup some well-known files for matrix
- name: Create a file for matrix clients
copy: dest=/srv/web/.well-known-matrix-client-fedoraproject-org src=.well-known-matrix-client-fedoraproject-org
owner=root group=root mode=0644
setype=httpd_sys_content_t
tags:
- fedora-web
- fedora-web/main
- fedora-web/matrix
- name: Create a file for matrix servers
copy: dest=/srv/web/.well-known-matrix-server-fedoraproject-org src=.well-known-matrix-server-fedoraproject-org
owner=root group=root mode=0644
setype=httpd_sys_content_t
tags:
- fedora-web
- fedora-web/main
- fedora-web/matrix