server { listen 80; server_name matrix.teier.eu; return 301 https://$server_name:443$request_uri; } server { listen 443 ssl http2; # Federation Port listen 8448 ssl http2; ssl on; ssl_certificate /etc/letsencrypt/live/teier.eu/fullchain.pem; ssl_certificate_key /etc/letsencrypt/live/teier.eu/privkey.pem; server_name matrix.teier.eu; location ~* ^(\/_matrix|\/_synapse\/client) { proxy_pass http://127.0.0.1:8008; proxy_set_header X-Forwarded-For $remote_addr; client_max_body_size 50M; } }