Nginx PhpMyadmin error: 413 Request Entity Too Large

author

Lets Try

. min read

Follow

A 413 Nginx error occurred while uploading the database through phpMyAdmin.  the requested entity was too large as per the error. 


Solution : 


If you are trying to upload large files and are seeing this error, it means the client_max_body_size value is too low.


You may access the Nginx configuration file with the command:


sudo nano /etc/nginx/nginx.conf


It may also be located in /usr/local/nginx/conf/nginx.conf or /usr/local/etc/nginx/nginx.conf.


Add the following line within the http block


http {

    . . .

    client_max_body_size 128M;

    . . .

}


Save and exit (press CTRL + X, press Y and then press ENTER)


Now, check if the Nginx config file syntax is valid.


sudo nginx -t


If valid, restart Nginx service.


sudo systemctl restart  nginx


You may also need to edit the php.ini config file.

Done!

More Stories from Developerbook

Install Premium URL Shortener in DigitalOcean Cloud Server

Install Premium URL Shortener in DigitalOcean Cloud Server

How To Import and Export Large Database files in MySQL or MariaDB

How To Import and Export Large Database files in MySQL or MariaDB

How to setup Erlang on windows environment

How to setup Erlang on windows environment

How to configure eclipse plug-in for erlang

How to configure eclipse plug-in for erlang

Isolation concept for transaction

Isolation concept for transaction