2023-09-27 13:49:56 +02:00
|
|
|
server {
|
|
|
|
|
|
|
|
listen 443 ssl http2;
|
|
|
|
listen [::]:443 ssl http2;
|
|
|
|
|
|
|
|
ssl_certificate /ssl/chain.crt;
|
|
|
|
ssl_certificate_key /ssl/certificate.keyplain;
|
|
|
|
|
2023-10-19 19:24:46 +02:00
|
|
|
client_max_body_size 25m;
|
2023-09-27 13:49:56 +02:00
|
|
|
|
|
|
|
error_page 403 404 /403_404.html;
|
|
|
|
location = /403_404.html {
|
|
|
|
default_type application/json;
|
|
|
|
return 200 'You are not authorized to access this page.';
|
|
|
|
}
|
|
|
|
|
2023-10-02 10:45:47 +02:00
|
|
|
location / {
|
|
|
|
root /www;
|
2023-09-27 13:49:56 +02:00
|
|
|
}
|
|
|
|
|
2023-11-15 23:30:05 +01:00
|
|
|
# Sync requests
|
|
|
|
location ~ ^/_matrix/client/(r0|v3)/sync$|^/_matrix/client/(api/v1|r0|v3)/events$|^/_matrix/client/(api/v1|r0|v3)/initialSync$|^/_matrix/client/(api/v1|r0|v3)/rooms/[^/]+/initialSync$ {
|
|
|
|
proxy_set_header X-Forwarded-For $remote_addr;
|
|
|
|
proxy_set_header X-Forwarded-Proto $scheme;
|
|
|
|
proxy_set_header Host $http_host;
|
|
|
|
proxy_pass http://synapse-worker-sync:8008;
|
|
|
|
}
|
|
|
|
|
|
|
|
# Federation requests
|
|
|
|
location ~ ^/_matrix/federation/v1/event/|^/_matrix/federation/v1/state/|^/_matrix/federation/v1/state_ids/|^/_matrix/federation/v1/backfill/|^/_matrix/federation/v1/get_missing_events/|^/_matrix/federation/v1/publicRooms|^/_matrix/federation/v1/query/|^/_matrix/federation/v1/make_join/|^/_matrix/federation/v1/make_leave/|^/_matrix/federation/(v1|v2)/send_join/|^/_matrix/federation/(v1|v2)/send_leave/|^/_matrix/federation/(v1|v2)/invite/|^/_matrix/federation/v1/event_auth/|^/_matrix/federation/v1/timestamp_to_event/|^/_matrix/federation/v1/exchange_third_party_invite/|^/_matrix/federation/v1/user/devices/|^/_matrix/key/v2/query|^/_matrix/federation/v1/hierarchy/|^/_matrix/federation/v1/send/ {
|
|
|
|
|
|
|
|
proxy_set_header X-Forwarded-For $remote_addr;
|
|
|
|
proxy_set_header X-Forwarded-Proto $scheme;
|
|
|
|
proxy_set_header Host $http_host;
|
|
|
|
proxy_pass http://synapse-worker-federation:8008;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
# All other matrix/synapse requests
|
2023-09-27 13:49:56 +02:00
|
|
|
location ~ /_matrix|/_synapse {
|
|
|
|
proxy_set_header X-Forwarded-For $remote_addr;
|
|
|
|
proxy_set_header X-Forwarded-Proto $scheme;
|
|
|
|
proxy_set_header Host $http_host;
|
|
|
|
|
|
|
|
proxy_connect_timeout 600s;
|
|
|
|
proxy_send_timeout 600s;
|
|
|
|
proxy_read_timeout 600s;
|
|
|
|
send_timeout 600s;
|
|
|
|
|
2023-11-15 23:30:05 +01:00
|
|
|
proxy_pass http://synapse-worker-generic:8008;
|
2023-09-27 13:49:56 +02:00
|
|
|
}
|
|
|
|
}
|