fix: nginx 添加 client_max_body_size 200m 支持大文件上传
GraphRAG CI/CD / build-and-deploy (push) Successful in 2m29s

This commit is contained in:
2026-06-18 16:08:23 +08:00
parent d2f782e47e
commit 4f203e3b56
2 changed files with 10 additions and 2 deletions
+6 -2
View File
@@ -2,6 +2,8 @@ server {
listen 80; listen 80;
server_name _; server_name _;
client_max_body_size 200m;
root /usr/share/nginx/html; root /usr/share/nginx/html;
index index.html; index index.html;
@@ -10,9 +12,11 @@ server {
try_files $uri $uri/ /index.html; try_files $uri $uri/ /index.html;
} }
# Proxy API requests to backend # Proxy API requests to backend — use variable to defer DNS resolution
location /api/ { location /api/ {
proxy_pass http://backend:8000; resolver 10.43.0.10 valid=5s;
set $backend_upstream backend:8000;
proxy_pass http://$backend_upstream;
proxy_set_header Host $host; proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+4
View File
@@ -121,6 +121,8 @@ server {
ssl_certificate_key /etc/letsencrypt/live/plfai.cn/privkey.pem; ssl_certificate_key /etc/letsencrypt/live/plfai.cn/privkey.pem;
ssl_protocols TLSv1.2 TLSv1.3; ssl_protocols TLSv1.2 TLSv1.3;
client_max_body_size 200m;
location / { location / {
proxy_pass http://${backend_ip}:8000; proxy_pass http://${backend_ip}:8000;
proxy_set_header Host \$host; proxy_set_header Host \$host;
@@ -146,6 +148,8 @@ server {
ssl_certificate_key /etc/letsencrypt/live/plfai.cn/privkey.pem; ssl_certificate_key /etc/letsencrypt/live/plfai.cn/privkey.pem;
ssl_protocols TLSv1.2 TLSv1.3; ssl_protocols TLSv1.2 TLSv1.3;
client_max_body_size 200m;
location /api/ { location /api/ {
proxy_pass http://${backend_ip}:8000; proxy_pass http://${backend_ip}:8000;
proxy_set_header Host \$host; proxy_set_header Host \$host;