Nginx无法上传文件或者time out的解决办法

nginx上传附件都失败,并且页面偶尔提示timeout或者413 Request Entity Too Large
错误日志为:

  1. [error] 24225#0: *44 client intended to send too large body: 3005474 bytes, client: x.x.x.x, server: _, request: "POST /phpmyadmin/import.php HTTP/1.1", host: "baiqiuyi.com", referrer: "http://baiqiuyi.com/xxxxxxxxxxxxxxxxxx
  1. 打开nginx.conf并在http{}字段里添加
  2. client_max_body_size 64M; #多少M根据实际情况填写
  3. # keepalive_timeout 的值最好也修改一下,否则phpmyadmin上传的时候很容易time out


强帖留名: