location ^~ /api/ {proxy_pass http://192.168.0.6:91087/;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_connect_timeout 300s;proxy_send_timeout 300s;proxy_read_timeout 120s; # 关键设为后端最大耗时的 1.5~2 倍}