user image

Joseph Morgan
Published in : 2022-02-01

[solved] Nginx 413 Request Entity Too Large - Laravel


Hello there,
I am facing this error when I try to upload image more than 1MB to my server which is running with Laravel & Nginx 

What Should i do, I tried to update the php.ini & increased the values of 

and nothing is changing the same error, please help!


Mohamed Atef Date : 2022-02-01

Best answers


Best answers


It seems that the error is not from PHP this is Nginx error I suggest that you can update the client_max_body_size from the configuration file by the next steps 

  1. use SSH connection to connect to your server
  2. go to /etc/nginx/sites-available using this command
    cd /etc/nginx/sites-available
  3. see which config file is using probably it will be named with the domain name you are using
  4. consider it's called “default” so you can run this command to edit it 
    sudo nano default (sudo nano domain_name)
  5. then between the server { … } add client_max_body_size 64M;


server {
	client_max_body_size 64M;

that's all, good luck

Joseph Morgan Date : 2022-02-01

Best solution, you are amazing :) Thanks 

Leave a comment

Join us

Join our community and get the chance to solve your code issues & share your opinion with us

Sign up Now

Related posts

[SOLVED] No application encryption key has been specified.
Publish date: 2021-05-17 | Comments: 2
How I can exclude private property from var_dump or object?
Publish date: 2022-02-22 | Comments: 2
Laravel clear cache files manually
Publish date: 2022-03-02 | Comments: 2
tymon/jwt-auth 0.5.12 requires illuminate/support ~5.0
Publish date: 2022-02-18 | Comments: 2
Uncaught Error: Missing required parameters: sitekey Laravel
Publish date: 2022-01-08 | Comments: 2