synapse.conf
· 1.4 KiB · Text
Brut
server {
listen 443 ssl;
listen [::]:443 ssl;
server_name matrix.swee.codes;
# Element instance hosted on Sugarcane
location / {
proxy_pass http://sugarcane.node.swee.codes;
proxy_set_header Host $host;
}
# Forward matrix specs and synapse client
location ~ ^/_(matrix/client|matrix/media|synapse/client) {
proxy_pass https://peppermint.node.swee.codes:8008;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Host $host:$server_port;
proxy_http_version 1.1;
}
# Federation is on a different port on my setup.
location ~ ^/_matrix/federation {
proxy_pass https://peppermint.node.swee.codes:8448;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Host $host:$server_port;
proxy_http_version 1.1;
}
# n.swee.codes has an iframe to the Element instance
proxy_hide_header X-Frame-Options;
add_header X-Frame-Options "";
ssl_certificate /etc/letsencrypt/live/matrix.swee.codes/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/matrix.swee.codes/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
}
| 1 | server { |
| 2 | listen 443 ssl; |
| 3 | listen [::]:443 ssl; |
| 4 | |
| 5 | server_name matrix.swee.codes; |
| 6 | # Element instance hosted on Sugarcane |
| 7 | location / { |
| 8 | proxy_pass http://sugarcane.node.swee.codes; |
| 9 | proxy_set_header Host $host; |
| 10 | } |
| 11 | |
| 12 | # Forward matrix specs and synapse client |
| 13 | location ~ ^/_(matrix/client|matrix/media|synapse/client) { |
| 14 | proxy_pass https://peppermint.node.swee.codes:8008; |
| 15 | proxy_set_header X-Forwarded-For $remote_addr; |
| 16 | proxy_set_header X-Forwarded-Proto $scheme; |
| 17 | proxy_set_header Host $host:$server_port; |
| 18 | proxy_http_version 1.1; |
| 19 | } |
| 20 | |
| 21 | # Federation is on a different port on my setup. |
| 22 | location ~ ^/_matrix/federation { |
| 23 | proxy_pass https://peppermint.node.swee.codes:8448; |
| 24 | proxy_set_header X-Forwarded-For $remote_addr; |
| 25 | proxy_set_header X-Forwarded-Proto $scheme; |
| 26 | proxy_set_header Host $host:$server_port; |
| 27 | proxy_http_version 1.1; |
| 28 | } |
| 29 | |
| 30 | # n.swee.codes has an iframe to the Element instance |
| 31 | proxy_hide_header X-Frame-Options; |
| 32 | add_header X-Frame-Options ""; |
| 33 | |
| 34 | ssl_certificate /etc/letsencrypt/live/matrix.swee.codes/fullchain.pem; # managed by Certbot |
| 35 | ssl_certificate_key /etc/letsencrypt/live/matrix.swee.codes/privkey.pem; # managed by Certbot |
| 36 | include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot |
| 37 | ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot |
| 38 | } |