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

56 lines
1.3 KiB
Plaintext
Raw Normal View History

2023-03-31 00:58:18 -03:00
server {
2023-04-16 14:30:39 -04:00
# Common shit
include configs/general.conf;
2023-03-31 00:58:18 -03:00
server_name matrix.zzls.xyz;
location /.well-known/matrix/server {
2023-04-23 18:40:49 -04:00
return 200 '{ "m.server": "matrix.zzls.xyz:8448" }';
2023-03-31 00:58:18 -03:00
}
location /.well-known/matrix/client {
2023-04-23 18:40:49 -04:00
default_type application/json;
add_header Access-Control-Allow-Origin '*';
2023-03-31 00:58:18 -03:00
return 200 '{ "m.homeserver": { "base_url": "https://matrix.zzls.xyz" } }';
}
2023-04-16 14:30:39 -04:00
location / {
alias /var/www/cinnyclient/;
index index.html;
}
2023-06-05 23:38:18 -04:00
location ~ ^(/_matrix|/_synapse/client|/health) {
2023-04-16 14:30:39 -04:00
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;
2023-03-31 00:58:18 -03:00
}
# SecHeaders
2023-04-05 01:03:14 -04:00
include configs/security.conf;
2023-03-31 00:58:18 -03:00
2023-04-16 14:30:39 -04:00
# QUIC
2023-04-23 18:40:49 -04:00
add_header Alt-Svc 'h3=":443", h3=":8448"; ma=86400';
2023-03-31 01:07:23 -03:00
2023-04-16 14:30:39 -04:00
listen 443 quic reuseport;
listen 443 ssl reuseport;
listen 8448 ssl default_server reuseport;
2023-04-16 14:30:39 -04:00
listen 8448 quic default_server reuseport;
http2 on;
2023-04-30 19:31:02 -04:00
include configs/ssl.conf;
2023-03-31 00:58:18 -03:00
}
server {
if ($host = matrix.zzls.xyz) {
return 301 https://$host$request_uri;
2023-04-16 14:30:39 -04:00
}
2023-03-31 00:58:18 -03:00
2023-04-16 14:30:39 -04:00
listen 80;
2023-03-31 00:58:18 -03:00
server_name matrix.zzls.xyz;
}