Answer the question
In order to leave comments, you need to log in
How to configure Nginx + php to correct "413 Request Entity Too Large" error?
I do all this in docker
Roughly speaking, I indicated in php.ini
post_max_size = 1M
upload_max_filesize = 1M
client_max_body_size 2m;
<html>
<head>
<title>413 Request Entity Too Large</title>
</head>
<body>
<center>
<h1>413 Request Entity Too Large</h1>
</center>
<hr>
<center>nginx/1.17.5</center>
</body>
</html>
Answer the question
In order to leave comments, you need to log in
Well, first there is an appeal to nginx. It processes the incoming request and looks through its filters. Therefore, if you upload more than the allowed file, then at first nginx will give an error, and this file (or whatever you upload there) will not reach php. Nginx is a proxy server (roughly speaking)
I advise you not to put 1GB in nginx, otherwise it will be bad.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question