413 request entity too large php, nginx:413 Request Entity Too Large processing method

413 request entity too large php, nginx:413 Request Entity Too Large processing method
Modify Nginx.conf add this below in this file.
keepalive_timeout 100; #This parameter indicates the http connection timeout time, the default is 65s. If the uploaded file is relatively large and the upload is not completed within the specified time, the connection will be automatically disconnected! So increase this time appropriately.
fastcgi_connect_timeout 6000;
fastcgi_send_timeout 6000;
fastcgi_read_timeout 6000;
fastcgi_buffer_size 256k;
fastcgi_buffers 8 256k;
fastcgi_busy_buffers_size 256k;
fastcgi_temp_file_write_size 256k;
client_header_timeout 120s; #Bigger
client_body_timeout 120s; #Bigger
client_max_body_size 100m; #Mainly this parameter limits the size of uploaded files
client_body_buffer_size 256k;
A) Modify the configuration of php.ini
vim /etc/php.ini
cgi.fix_pathinfo=1 #Remove the comment and enable the pathinfo pseudo-static function of PHP.
max_execution_time = 0 #The maximum time the script runs, the default is 30 seconds
max_input_time = 300 #The time the script can consume, the default is 60 seconds
memory_limit = 256M #The script runs the maximum memory consumption, change the value according to your needs, the default is 128M
post_max_size = 100M #The maximum data submitted by a single submission, this item does not limit the size of a single uploaded file, but limits the submission data of the entire form. The scope of restriction includes all content submitted by the form. For example: when posting, the post title, content, attachments, etc. 8M by default
upload_max_filesize = 10M#The maximum allowed size of uploaded files, the default is 2M

Leave A Comment?