server { listen 6464; # Serve React static files location / { root /usr/share/nginx/html; try_files $uri $uri/ /index.html; } # Proxy API requests to FastAPI location /api/ { proxy_pass http://localhost:5252; } # Proxy short link requests to FastAPI location /c/ { proxy_pass http://localhost:5252; set_real_ip_from 0.0.0.0/0; real_ip_header X-Forwarded-For; real_ip_recursive on; } # Proxy docs to FastAPI location /docs { proxy_pass http://localhost:5252/docs; } # Proxy /openapi.json to FastAPI location /openapi.json { proxy_pass http://localhost:5252/openapi.json; } }