server { listen [300:dada:feda:f443::12]:443 ssl; listen [300:dada:feda:f443::12]:8448 ssl; server_name twinkle.ygg.at; ssl_certificate /etc/letsencrypt/live/twinkle.ygg.at/fullchain.pem; ssl_certificate_key /etc/letsencrypt/live/twinkle.ygg.at/privkey.pem; client_max_body_size 1000M; location /_matrix { proxy_pass http://127.0.0.1:8008; proxy_set_header X-Forwarded-For $remote_addr; proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header X-Real-IP $remote_addr; proxy_set_header Host $host; client_max_body_size 500M; } location /.well-known/matrix/client { return 200 '{"m.homeserver": {"base_url": "https://twinkle.ygg.at"}}'; add_header Content-Type application/json; add_header Access-Control-Allow-Origin *; } } server { listen 193.111.115.214:443 ssl; listen 193.111.115.214:8448 ssl; server_name twinkle.ygg.at; ssl_certificate /etc/letsencrypt/live/twinkle.ygg.at/fullchain.pem; ssl_certificate_key /etc/letsencrypt/live/twinkle.ygg.at/privkey.pem; client_max_body_size 1000M; location /_matrix/client { return 404; } location /_matrix { proxy_pass http://127.0.0.1:8008; proxy_set_header X-Forwarded-For $remote_addr; proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header X-Real-IP $remote_addr; proxy_set_header Host $host; client_max_body_size 500M; } location /.well-known/matrix/client { return 200 '{"m.homeserver": {"base_url": "https://twinkle.ygg.at"}}'; add_header Content-Type application/json; add_header Access-Control-Allow-Origin *; } }