Datura-Network/2-Decentralization/matrix/nginx.conf

41 lines
1.4 KiB
Nginx Configuration File
Raw Normal View History

2024-02-26 11:43:56 +01:00
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
# For the federation port
listen 8448 ssl http2;
listen [::]:8448 ssl http2;
server_name m.datura.network;
ssl_certificate /root/.acme.sh/m.datura.network/fullchain.cer;
ssl_certificate_key /root/.acme.sh/m.datura.network/m.datura.network.key;
#location ~ ^(/_matrix|/_synapse/client|/_synapse/admin) { # to enable remote administration
location ~ ^(/_matrix|/_synapse/client) {
# note: do not add a path (even a single /) after the port in `proxy_pass`,
# otherwise nginx will canonicalise the URI and cause signature verification
# errors.
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;
# Nginx by default only allows file uploads up to 1M in size
# Increase client_max_body_size to match max_upload_size defined in homeserver.yaml
client_max_body_size 50M;
# Synapse responses may be chunked, which is an HTTP/1.1 feature.
proxy_http_version 1.1;
}
#location / {
# proxy_pass http://127.0.0.1:9090/;
# proxy_set_header X-Forwarded-For $remote_addr;
# proxy_set_header X-Forwarded-Proto $scheme;
# proxy_set_header Host $host;
# client_max_body_size 50M;
#}
}