servers/roles/synapse/templates/nginx.conf.j2
Timotej Lazar e101493889 Add synapse role
For all the hipster kids.
2024-06-25 10:14:06 +02:00

21 lines
692 B
Django/Jinja

server {
server_name {{ dns_name }};
listen [::]:443 ssl ipv6only=off;
ssl_certificate /etc/letsencrypt/live/{{ dns_name }}/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/{{ dns_name }}/privkey.pem;
location ~ ^(/_matrix|/_synapse/client) {
proxy_pass http://unix:/var/lib/synapse/socket/main.sock;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Host $host;
# match max_upload_size defined in homeserver.yaml
client_max_body_size 50M;
# Synapse responses may be chunked, which is an HTTP/1.1 feature.
proxy_http_version 1.1;
}
}