Php 文件上载在AWS Linux 2服务器中的工作空间不超过10mb?

Php 文件上载在AWS Linux 2服务器中的工作空间不超过10mb?,php,amazon-ec2,Php,Amazon Ec2,当我尝试上传超过10mb的视频时,服务器显示错误502,我在php.ini文件中也做了更改,phpinfo也反映了更改 post_max_size 40M upload_max_filesize 35M max_execution_time 1200 max_input_time 选择要上载的图像: 您使用API网关吗?它对有效负载大小有10Mb的限制。请参阅: 您使用API网关吗?它对有效负载大小有10Mb的限制。请参阅: 您确定这是文件大小的问题吗?

当我尝试上传超过10mb的视频时,服务器显示错误502,我在php.ini文件中也做了更改,phpinfo也反映了更改

    post_max_size 40M
    upload_max_filesize 35M
    max_execution_time 1200
    max_input_time 


选择要上载的图像:

您使用API网关吗?它对有效负载大小有10Mb的限制。请参阅:


您使用API网关吗?它对有效负载大小有10Mb的限制。请参阅:


您确定这是文件大小的问题吗?可能您的请求太长(比Nginx超时时间长)不,当我上传5mb的视频时,它工作正常,当上传10mb时,它显示“当前无法处理此请求。HTTP错误502”,并且我正在使用“amzn2 ami hvm”服务器。您确定这是文件大小的问题吗?可能您的请求太长(比Nginx超时时间长)不,当我上传5mb的视频时,它的工作正常,当上传10mb时,它的显示“当前无法处理此请求。HTTP错误502”,并且我正在使用“amzn2 ami hvm”服务器不,我没有使用API网关。不,我没有使用API网关。
    <?php
    error_reporting(E_ALL);
    $target_dir = "uploads/";
    $target_file = $target_dir . basename($_FILES["fileToUpload"]["name"]);

    if (move_uploaded_file($_FILES["fileToUpload"]["tmp_name"], $target_file)) {
    echo "The file ". basename( $_FILES["fileToUpload"]["name"]). " has been uploaded.";
        } else {
            echo "Sorry, there was an error uploading your file.";
        }

    ?>

    <!DOCTYPE html>
    <html>
    <body>
    <form action="upload.php" method="post" enctype="multipart/form-data">
        Select image to upload:
        <input type="file" name="fileToUpload" id="fileToUpload">
        <input type="submit" value="Upload Image" name="submit">
    </form>

    </body>
    </html>