Sending files in Nginx error "413 Request Entity Too Large"

7

I'm trying to send a file of 2MB using Nginx, but I keep getting 413 arquivo muito grande .

Version: Nginx / 1.4.6

OS: Ubuntu 14.04 LTS

    
asked by anonymous 24.11.2014 / 14:53

1 answer

19

You need to make changes to the file php.ini

upload_max_filesize = <Tamanho Desejado>M  

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

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

And finally, restart the service.

# service nginx restart

Here it is working properly.

    
24.11.2014 / 15:19