vps/nginx/sites-enabled/homepage.conf
2024-10-15 21:44:02 +02:00

25 lines
629 B
Text

server {
listen 443 ssl;
listen [::]:443 ssl;
server_name ${env['domain']};
location = /.well-known/matrix/server {
default_type application/json;
return 200 '{ "m.server": "matrix.${env["domain"]}:443" }';
}
location = /.well-known/matrix/client {
default_type application/json;
include /etc/nginx/snippets/ssl-headers.conf;
add_header Access-Control-Allow-Origin '*';
return 200 '{ "m.homeserver": { "base_url": "https://matrix.${env["domain"]}" } }';
}
location / {
proxy_pass http://127.0.0.1:${env['ports']['homepage']};
}
}