aps-agent/deploy/nginx-aps.conf

27 lines
748 B
Plaintext
Raw Normal View History

# APS Web 部署参考(Nginx):静态前端 + /api 反代 FastAPI
# 关键项:client_max_body_size 必须 >= 100m,否则 2MB 以上 DXF/PDF 会被网关直接 413。
server {
listen 80;
server_name _;
client_max_body_size 100m;
root /usr/share/nginx/html;
index index.html;
location /api/ {
proxy_pass http://127.0.0.1:8000;
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_read_timeout 300s;
proxy_send_timeout 300s;
}
location / {
try_files $uri $uri/ /index.html;
}
}