This message occurs whenever I attempt to upload a tệp tin greater than 2M in I have made the follow changes in order khổng lồ increase the allowed tệp tin upload sizes:

In nginx.conf, I added

client_max_body_size 200M;In php.ini, I modified

upload_max_filesize = 200Mmax_file_uploads = 20Post_max_size = 256MIn wp-config.php, I added

ini_set( "memory_limit" , 256M" );Even with these parameters set in the three configuration files I am still getting the message413 Request Entity Too Large nginx/1.18.0 (Ubuntu)

Can anyone help?


Problem Solved

In addition to lớn increasing the maximum kích cỡ in nginx.conf, php.ini & wp-conf.php files, it was necessary to raise the limit in the nginx vps block for the site. I increased the default value of

client_max_body_size 2M; toclient_max_body_size 200M;and now all uploads go smoothly và quickly.

Bạn đang xem: Nginx

Hopefully, someone can tell me why I had khổng lồ modify 4 separate files in order to raise the form size limit when uploading files.



You can địa chỉ cửa hàng client_max_body_size or midify it in /etc/nginx/nginx.conf in 3 blocks

HTTP block : which affects all vps blocks (virtual hosts)

http ... # increase the limit client_max_body_size 100M; SERVER block : which affects a particular site/app.

server ... # increase the limit client_max_body_size 100M;LOCATION block : which affects a particular directory (uploads) under a site/app.

Xem thêm: Review Nước Hoa Khô Shimang Mùi Nào Thơm Nhất Hiện Nay 2022, Các Mùi Nước Hoa Khô Shimang

location ... # increase the limit client_max_body_size 100M;After having edited the configuration tệp tin you must restart your nginx server

$ systemctl restart nginx
nội dung
Improve this answer
answered Mar 5, 2021 at 13:06


10111 bronze badge
add a bình luận |

Your Answer

Thanks for contributing an answer to Development Stack Exchange!

Please be sure lớn answer the question. Provide details and share your research!

But avoid

Asking for help, clarification, or responding to lớn other answers.Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Facebook
Sign up using email and Password

Post as a guest

thư điện tử Required, but never shown

Post as a guest

thư điện tử

Required, but never shown

Post Your Answer Discard

By clicking “Post Your Answer”, you agree to lớn our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged uploads nginx or ask your own question.

The Overflow Blog
Ubuntu 12.04, Nginx and MySQL issue with Database
tệp tin exceeds upload_max_filesize, despite max filesize being large enough
0 upload permission on nginx và ubuntu
Receiving 404 when uploading file larger than 10kb
Hot Network Questions more hot questions

Question feed
Subscribe lớn RSS
Question feed lớn subscribe khổng lồ this RSS feed, copy và paste this URL into your RSS reader.


default Development
Stack Exchange Network
Site design / hình ảnh sản phẩm © 2022 Stack Exchange Inc; user contributions licensed under cc by-sa. Rev2022.4.4.41856 is a trademark of the Foundation, registered in the US và other countries. This site is not affiliated with the Foundation in any way. Development Stack Exchange works best with JavaScript enabled

Your privacy

By clicking “Accept all cookies”, you agree Stack Exchange can store cookies on your device & disclose information in accordance with our Cookie Policy.

Leave a Reply

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

  • Cách xin nghỉ hẳn học thêm

  • Cách xóa gợi ý tìm kiếm trên messenger

  • Hình nền điện thoại chất full hd 4k

  • Hướng dẩn cách mở khóa khi bị chặn chức năng gửi tin nhắn.

  • x

    Welcome Back!

    Login to your account below

    Retrieve your password

    Please enter your username or email address to reset your password.