Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions modules/ocf_www/files/matrix-server
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"m.server": "matrix.ocf.berkeley.edu:443"
}
16 changes: 16 additions & 0 deletions modules/ocf_www/manifests/site/www.pp
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,13 @@
include ocf_www::mod::php
include ocf_www::mod::suexec

file {
['/var/www/html/.well-known', '/var/www/html/.well-known/matrix']:
ensure => 'directory';
'/var/www/html/.well-known/matrix/server':
source => 'puppet:///modules/ocf_www/matrix-server';
}

# TODO: dev-death should add a robots.txt disallowing everything
apache::vhost { 'www':
servername => 'www.ocf.berkeley.edu',
Expand All @@ -42,6 +49,13 @@
request_headers => ['set X-Forwarded-Proto https'],
proxy_preserve_host => true,

aliases => [
{
alias => '/.well-known/matrix/server',
path => '/var/www/html/.well-known/matrix/server',
},
],

rewrites => [
{
comment => 'redirect .well-known/host-meta to mastodon',
Expand All @@ -56,6 +70,8 @@
'%{REQUEST_URI} !^/icons/',
# ...hide ocfweb metrics
'%{REQUEST_URI} !^/metrics',
# ...and not if it's the matrix well-known file
'%{REQUEST_URI} !^/\.well-known/matrix',
],
rewrite_rule => '^/(.*)$ http://lb.ocf.berkeley.edu:4080/$1 [P]',
}
Expand Down