Spaces:
Sleeping
Sleeping
| user appuser; | |
| pid /tmp/nginx.pid; | |
| worker_processes auto; | |
| events { worker_connections 1024; } | |
| http { | |
| include mime.types; | |
| default_type application/octet-stream; | |
| sendfile on; tcp_nopush on; keepalive_timeout 65; | |
| server_tokens off; underscores_in_headers on; | |
| access_log /tmp/nginx/access.log; | |
| error_log /tmp/nginx/error.log warn; | |
| server { | |
| listen 7860; # 必须与 App Port 一致 | |
| server_name _; | |
| client_max_body_size 32m; | |
| location / { | |
| proxy_pass http://127.0.0.1:8000; # 同容器的 Uvicorn | |
| proxy_http_version 1.1; | |
| 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_connect_timeout 600s; | |
| proxy_send_timeout 600s; | |
| proxy_read_timeout 600s; | |
| send_timeout 600s; | |
| proxy_buffering off; | |
| proxy_cache off; | |
| chunked_transfer_encoding off; | |
| proxy_set_header Connection ""; | |
| } | |
| } | |
| } |