server {
listen 80;
server_name synapse.mixedcontent.net;
return 301 https://$server_name$request_uri;
}
server {
listen 443 ssl;
listen [::]:443 ssl;
server_name synapse.mixedcontent.net;
ssl_certificate /etc/letsencrypt/live/synapse.mixedcontent.net/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/synapse.mixedcontent.net/privkey.pem;
location /_matrix {
proxy_pass http://localhost:8008;
proxy_set_header X-Forwarded-For $remote_addr;
}
location / {
proxy_pass http://localhost:8008;
proxy_set_header X-Forwarded-For $remote_addr;
}
}