Kdyz nginx server hlasi po uploadu vetšího souboru zprávu:  ”Nginx: 413 Request Entity Too Large”, musíme splnit několik podmínek.

Viz návod…

PHP musí mít nastavený v php.ini:

post_max_size = 20M

To je hodnota celého postu včetně všech hodnot.

upload_max_filesize = 15M

To je hodnota samotných souborů při uploadu. Post_max_size by měl být vždy větší jak upload_max_filesize!

Pak už jenom nastavení samotného vhostu v nginx:

location ~ \.php$ {
...
client_max_body_size 20M;
client_body_buffer_size 128k;
...
}

a uděláme test konfigurace:

nginx -t

a pokud nenastane chyba, server restartujem:

service nginx restart

#případně 

/etc/init.d/nginx restart

Tím dovolíme přijímat serveru nginx větší soubory a chyba “413 Request Entity Too Large” by se už neměla objevit.

 

Tagged with:
 
  • Facebook
  • Twitter
  • Digg
  • Reddit
  • LinkedIn
  • RSS Feed

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Set your Twitter account name in your settings to use the TwitterBar Section.