etc-configs/nginx/sites-available/matrix.zzls.xyz.conf

53 lines
1.3 KiB
Plaintext
Raw Permalink Normal View History

2023-03-31 00:58:18 -03:00
server {
server_name matrix.zzls.xyz;
include configs/general.conf;
include configs/security.conf;
include configs/robotsNone.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 '*';
2023-11-04 16:44:55 -03:00
return 200 '{ "m.homeserver": { "base_url": "https://matrix.zzls.xyz" }, "org.matrix.msc3575.proxy": {"url": "https://matrix.zzls.xyz"}}';
}
location / {
alias /var/www/cinnyclient/;
index index.html;
}
2023-11-04 16:44:55 -03:00
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) {
2023-11-04 16:44:55 -03:00
proxy_pass http://127.0.0.1:40020;
include configs/proxy.conf;
client_max_body_size 64M;
}
# QUIC
add_header Alt-Svc 'h3=":443", h3=":8448"; ma=86400';
listen 443 quic reuseport;
listen 443 ssl reuseport;
listen 8448 ssl default_server reuseport;
listen 8448 quic default_server reuseport;
include configs/ssl.conf;
http2 on;
2023-03-31 00:58:18 -03:00
}
server {
if ($host = matrix.zzls.xyz) {
return 301 https://$host$request_uri;
}
listen 80;
server_name matrix.zzls.xyz;
2023-03-31 00:58:18 -03:00
}