Sending Files on Nginx Error "413 Request Entity Too Large"

Asked

Viewed 19,729 times

10

I’m trying to send a file from 2MB using Nginx, but I keep receiving the 413 arquivo muito grande.

Version: Nginx/1.4.6

OS: Ubuntu 14.04 LTS

1 answer

28


It is necessary to make changes to the file php.ini

upload_max_filesize = <Tamanho Desejado>M  

Then change the server settings in Nginx. In the file /etc/nginx/conf.d/default.conf or your server file in the folder /etc/nginx/sites-available/

server {
    client_max_body_size <Tamanho Desejado>M;
    ...
}

And finally, restart the service.

# service nginx restart

Here it’s working properly.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.