Files
BiliNote/nginx/default.conf
黄建武 44d89e3b73 feat(nginx): 调整客户端请求体大小限制
- 设置 client_max_body_size 为 10G,允许上传大文件- 设置 client_body_buffer_size 为 128k,优化请求体缓冲
2025-05-15 11:34:39 +08:00

23 lines
534 B
Plaintext

server {
listen 80;
client_max_body_size 10G;
client_body_buffer_size 128k;
# 所有非 /api 请求全部代理给 frontend 容器
location / {
proxy_pass http://frontend:80;
}
# 所有 /api 请求代理给 backend 容器
location /api/ {
proxy_pass http://backend:8000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}
location /static/ {
proxy_pass http://backend:8000/static/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}
}