【Vegas原创】wordpress 从服务器收到预料之外的响应。此文件可能已被成功上传。请检查媒体库或刷新本页。解决方法。
作者:互联网
情况:媒体服务器上传小文件没问题,大一点的文件报这个错误。
原因:这是因为nginx限制了请求体大小
方案:需要在nginx的虚拟机配置文件中添加:
client_max_body_size 50m;
server{ listen 80; server_name jesus.weyomusic.com; location / { 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_pass http://ip:81; } } server{ listen 80; server_name weyomusic.com www.weyomusic.com; location / { 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_pass http://ip:81; client_max_body_size 50M; } }
标签:set,weyomusic,Forwarded,server,header,Vegas,wordpress,proxy,本页 来源: https://www.cnblogs.com/amadeuslee/p/15038976.html