Files
fpov/roles/nginx-proxy/templates/default.conf.j2
2026-03-16 12:28:58 -06:00

37 lines
1.1 KiB
Django/Jinja
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Landing page (root path)
server {
listen 80;
server_name {{ landing_domain }} {{ matrix_domain }};
root {{ nginx_webroot }};
index index.html;
location / {
try_files $uri $uri/ =404;
}
# Matrix Synapse
location /_matrix/ {
proxy_pass http://127.0.0.1:8008/_matrix/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Server $host;
proxy_buffering off;
proxy_request_buffering off;
}
# Federation (port 8448 usually, but often proxied at /_matrix too)
location /_matrix/federation/v1/ {
proxy_pass http://127.0.0.1:8448/_matrix/federation/v1/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
# Optional: Caddy or Let’s Encrypt ACME
}