71 lines
2.1 KiB
Plaintext
Raw Normal View History

2021-08-01 14:34:00 +02:00
server {
listen 80 default_server;
2022-01-05 15:43:39 +01:00
listen [::]:80 default_server;
2022-01-09 12:46:03 +01:00
server_name matrix.envs.net;
2021-08-01 14:34:00 +02:00
location / {
return 307 https://$host$request_uri;
}
location /.well-known/acme-challenge/ {
alias /var/lib/letsencrypt/.well-known/acme-challenge/;
}
}
2022-01-05 15:43:39 +01:00
# WORKERS
2022-01-09 12:46:03 +01:00
include include.d/upstream_workers.conf;
2021-08-01 14:34:00 +02:00
server {
listen 443 ssl http2 default_server;
2022-01-05 15:43:39 +01:00
listen [::]:443 ssl http2 default_server;
2021-08-01 14:34:00 +02:00
server_name matrix.envs.net;
include snippets/ssl.conf;
## well-known
location /.well-known/matrix/support {
2022-06-14 21:06:03 +02:00
add_header Access-Control-Allow-Origin '*';
2021-08-01 14:34:00 +02:00
add_header Content-Type application/json;
return 200 '{"admins": [{"matrix_id": "@creme:envs.net", "email_address": "hostmaster@envs.net", "role": "admin"}], "support_page": "https://matrix.to/#/#envs:envs.net"}';
2021-08-01 14:34:00 +02:00
}
2022-01-08 14:44:18 +01:00
location /.well-known/matrix/server {
2022-06-14 21:06:03 +02:00
add_header Access-Control-Allow-Origin '*';
2022-01-08 14:44:18 +01:00
add_header Content-Type application/json;
return 200 '{"m.server": "matrix.envs.net:443"}';
}
location /.well-known/matrix/client {
2022-06-14 21:06:03 +02:00
add_header Access-Control-Allow-Origin '*';
2021-08-01 14:34:00 +02:00
add_header Content-Type application/json;
2022-03-08 16:24:25 +01:00
return 200 '{"m.homeserver": {"base_url": "https://matrix.envs.net"}, "m.integrations": {"managers": [{"ui_url": "https://dimension.envs.net/riot", "api_url": "https://dimension.envs.net/api/v1/scalar"}, {"ui_url": "https://scalar.vector.im/", "api_url": "https://scalar.vector.im/api"}]}, "m.integrations_widget": {"url": "https://dimension.envs.net/riot", "data": {"api_url": "https://dimension.envs.net/api/v1/scalar"}}, "m.tile_server": {"map_style_url": "https://api.maptiler.com/maps/streets/style.json?key=jrKVgM1ozvdgREfvtZ8X"}}';
2021-08-01 14:34:00 +02:00
}
2022-01-05 15:43:39 +01:00
# workers
2021-08-01 14:34:00 +02:00
include include.d/generic_worker.conf;
2022-01-05 15:43:39 +01:00
# mjolnir report
include include.d/mjolnir-report.conf;
2021-08-01 14:34:00 +02:00
##
2022-01-05 15:43:39 +01:00
location ~ ^(/_matrix|/_synapse/client) {
2021-08-01 14:34:00 +02:00
include include.d/synapse-proxy.conf;
2022-01-05 15:43:39 +01:00
proxy_pass http://localhost:8008;
2021-08-01 14:34:00 +02:00
}
# /synapse/admin
2022-01-05 15:43:39 +01:00
include include.d/synapse-admin.conf;
2021-08-01 14:34:00 +02:00
2022-01-05 15:43:39 +01:00
# media-repo
include include.d/media-repo.conf;
2021-08-01 14:34:00 +02:00
2022-01-05 15:43:39 +01:00
# MAUBOT
include include.d/maubot.conf;
2021-08-01 14:34:00 +02:00
##
location / {
include include.d/synapse-proxy.conf;
2022-01-05 15:43:39 +01:00
proxy_pass http://localhost:8008;
2021-08-01 14:34:00 +02:00
}
}