the server responded with a status of 504 (Gateway Time-out)
解决方法:
ngixn反向代理上传文件时间较长浏览器报错Failed to load resource: the server responded with a status of 504 (Gateway Time-out)
我针对某个接口设置了超时设置 proxy_send_timeout 600s;proxy_send_timeout 600s; proxy_read_timeout 600s; 三个属性,都设置为10分钟超时
location ~ /api/trainAndEducate/uploadFile{
client_max_body_size 100m;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header REMOTE-HOST $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_connect_timeout 600s;
proxy_send_timeout 600s;
proxy_read_timeout 600s;
proxy_pass http://127.0.0.1:9001;
}