# matrix/chat: HTTP → HTTPS (LAN-клиенты не должны получать 404) server { listen 80; listen [::]:80; server_name matrix.buryans.ru chat.buryans.ru; location /.well-known/matrix/client { default_type application/json; add_header Access-Control-Allow-Origin *; return 200 '{"m.homeserver":{"base_url":"https://matrix.buryans.ru/"}}'; } location / { return 301 https://$host$request_uri; } }