| worker_processes 1; | |
| events { worker_connections 1024; } | |
| http { | |
| include /etc/nginx/mime.types; | |
| default_type application/octet-stream; | |
| sendfile on; | |
| keepalive_timeout 65; | |
| server { | |
| listen 7860; | |
| # Matrix client-server API → Conduit | |
| location /_matrix/ { | |
| proxy_pass http://127.0.0.1:6167; | |
| proxy_set_header Host $host; | |
| proxy_set_header X-Real-IP $remote_addr; | |
| proxy_buffering off; | |
| proxy_read_timeout 600s; | |
| client_max_body_size 20M; | |
| } | |
| # .well-known for Matrix client discovery | |
| location /.well-known/matrix/ { | |
| proxy_pass http://127.0.0.1:6167; | |
| proxy_set_header Host $host; | |
| } | |
| # Everything else → FastAPI | |
| location / { | |
| proxy_pass http://127.0.0.1:8000; | |
| proxy_set_header Host $host; | |
| proxy_set_header X-Real-IP $remote_addr; | |
| proxy_buffering off; | |
| proxy_read_timeout 120s; | |
| } | |
| } | |
| } | |