current position:Home>Nginx error 413 Request Entity Too Large solution

Nginx error 413 Request Entity Too Large solution

2022-08-06 18:38:19As for why

Nginx will report a 413 error when uploading a large file. This article records the solution.

Problem Reason

  • Nginx default upload file size limit is 1M
  • If you want to adjust the upload file size limit, you need to adjust the configuration

Solutions

  • Modify the file /etc/nginx/nginx.conf
  • Add the following configuration in http{}:
client_max_body_size 512M;

  • Restart nginx
sudo systemctl restart nginx# orservice nginx restart

References

copyright notice
author[As for why],Please bring the original link to reprint, thank you.
https://en.qdmana.com/2022/218/202208061814417306.html

Random recommended