etc-configs/nginx/conf.d/matrix.zzls.xyz.conf

55 lines
1.3 KiB
Plaintext

server {
server_name matrix.zzls.xyz matrix.nadeko.net;
include configs/general.conf;
include configs/robotsNone.conf;
include configs/security.conf;
location /.well-known/matrix/server {
return 200 '{ "m.server": "matrix.zzls.xyz:8448" }';
}
location /.well-known/matrix/client {
default_type application/json;
add_header Access-Control-Allow-Origin '*';
return 200 '{ "m.homeserver": { "base_url": "https://matrix.zzls.xyz" }, "org.matrix.msc3575.proxy": {"url": "https://matrix.zzls.xyz"}}';
}
#location ~ ^/(client/|_matrix/client/unstable/org.matrix.msc3575/sync) {
# proxy_pass http://127.0.0.1:40022;
# proxy_set_header X-Forwarded-For $remote_addr;
# proxy_set_header X-Forwarded-Proto $scheme;
# proxy_set_header Host $host;
#}
location ~ ^(/_matrix|/_synapse/client|/health) {
proxy_pass http://127.0.0.1:10020;
include configs/proxy.conf;
client_max_body_size 64M;
}
# QUIC
include configs/http3.conf;
listen 443 ssl reuseport;
listen 8448 ssl default_server reuseport;
listen 8448 quic default_server reuseport;
include configs/ssl.conf;
http2 on;
}
server {
set $x "";
if ($host = matrix.zzls.xyz) {
set $x 1;
}
if ($host = matrix.nadeko.net) {
set $x 1;
}
if ($x = 1) {
return 301 https://$host$request_uri;
}
listen 80;
server_name matrix.zzls.xyz;
return 404;
}