feat: proxying support

Part of https://git.coopcloud.tech/coop-cloud/matrix-synapse/issues/1.
This commit is contained in:
cellarspoon
2021-12-12 23:31:37 +01:00
parent a5f9105613
commit 650e0cbc28
4 changed files with 55 additions and 9 deletions

26
nginx.conf.tmpl Normal file
View File

@ -0,0 +1,26 @@
user www-data;
events {
worker_connections 768;
}
http {
upstream backend {
server {{ env "STACK_NAME" }}_app:8008;
}
include /etc/nginx/mime.types;
server {
listen 80;
server_name {{ env "DOMAIN" }};
location ~* ^(\/_matrix|\/_synapse\/client) {
proxy_pass http://backend;
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;
}
}
}