feat: use nginx proxy, config for public rooms (fedi)

See https://git.coopcloud.tech/coop-cloud/matrix-synapse/issues/38.
This commit is contained in:
decentral1se
2023-10-08 01:41:29 +02:00
parent 7683ebd189
commit 08b49c14d9
17 changed files with 116 additions and 25 deletions

31
nginx.conf.tmpl Normal file
View File

@ -0,0 +1,31 @@
user www-data;
events {
worker_connections 768;
}
http {
server {
listen 80;
access_log off;
error_log /dev/null;
server_name {{ env "DOMAIN" }};
location ~* ^(\/_matrix|\/_synapse\/client) {
proxy_pass http://{{ env "STACK_NAME"}}_synapse:8008;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Host $host;
client_max_body_size 50M;
proxy_http_version 1.1;
}
location /.well-known/matrix/ {
root /var/www/;
default_type application/json;
add_header Access-Control-Allow-Origin *;
}
}
}