server { listen 8448 ssl; listen [::]:8448 ssl; server_name matrix.arcticfoxes.net; include /etc/nginx/ssl.conf; include /etc/nginx/proxy.conf; client_max_body_size 0; # https://element-hq.github.io/synapse/v1.123/usage/configuration/config_documentation.html#listeners location ~ ^/_matrix/(?:federation|media|key)/ { proxy_pass http://unix:/var/lib/matrix-synapse/matrix-synapse.sock:; access_log /var/log/nginx/access_federation.log main; } location / { return 404; access_log /var/log/nginx/access_federation_invalid.log main; } }