Files
stu_teacher/nginx.conf
T

24 lines
550 B
Nginx Configuration File

# nginx.conf:反向代理 FastAPI 后端
server {
listen 80;
server_name _;
client_max_body_size 20m;
# 健康检查
location = /health {
proxy_pass http://api:8000/;
access_log off;
}
# API 与文档
location / {
proxy_pass http://api:8000;
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_read_timeout 60s;
}
}