sight_chat / nginx.conf
fmegahed's picture
Create nginx.conf
8c0bb2f verified
raw
history blame contribute delete
597 Bytes
worker_processes auto;
events { worker_connections 1024; }
http {
sendfile on;
server {
# HF Spaces proxies public traffic to $PORT. We listen there.
listen 7860;
# Streamlit frontend
location / {
proxy_pass http://127.0.0.1:9000/;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
# FastAPI backend on same origin via path prefix
location /api/ {
proxy_pass http://127.0.0.1:9001/;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}
}