swee hat die Gist bearbeitet . Zu Änderung gehen
Keine Änderungen
swee hat die Gist bearbeitet . Zu Änderung gehen
1 file changed, 38 insertions
synapse.conf(Datei erstellt)
@@ -0,0 +1,38 @@ | |||
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 | + | } |
Neuer
Älter