56 lines
1.3 KiB
Plaintext
56 lines
1.3 KiB
Plaintext
server {
|
|
|
|
# Common shit
|
|
include configs/general.conf;
|
|
server_name matrix.zzls.xyz;
|
|
|
|
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" } }';
|
|
}
|
|
|
|
location / {
|
|
alias /var/www/cinnyclient/;
|
|
index index.html;
|
|
}
|
|
|
|
location ~ ^(/_matrix|/_synapse/client|/health) {
|
|
proxy_pass http://localhost:8008;
|
|
proxy_set_header X-Forwarded-For $remote_addr;
|
|
proxy_set_header X-Forwarded-Proto $scheme;
|
|
proxy_set_header Host $host;
|
|
client_max_body_size 64M;
|
|
proxy_http_version 1.1;
|
|
}
|
|
|
|
# SecHeaders
|
|
include configs/security.conf;
|
|
|
|
# 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;
|
|
http2 on;
|
|
include configs/ssl.conf;
|
|
|
|
}
|
|
server {
|
|
if ($host = matrix.zzls.xyz) {
|
|
return 301 https://$host$request_uri;
|
|
}
|
|
|
|
|
|
listen 80;
|
|
server_name matrix.zzls.xyz;
|
|
|
|
|
|
}
|