環境:CentOS 7.x
平台:Nginx + PHP-FPM
下圖顯示可以上傳2GB,但我上傳1.07MB的檔案卻跳HTTP錯誤

檢查error.log如下

5 client intended to send too large body: 1129070 bytes, client: IP地址, server: www.123.com, request: "POST /lab/wp-admin/async-upload.php HTTP/2.0", host: "www.123.com", referrer: "https://www.123.com/lab/wp-admin/upload.php

Google 下,原來Nginx也需要設定,故在nginx.conf內加入

        location ~ .*\.php$ {
            client_max_body_size 2048m;   #加入這段
    }

完成就可以正常上傳圖了