nginx large file upload gives HTTP Error 413 Request entity too large in rails

5,837

I would suggest looking at all the different places where client_max_body_size could be set. For example, in the server and location sections - anywhere that Nginx is pulling configuration files from.

To find any occurrences of client_max_body_size, try the following unix command from the nginx directory:

sudo grep -R 'client_max_body_size' ./*
Share:
5,837

Related videos on Youtube

Chittaranjan Nayak
Author by

Chittaranjan Nayak

Updated on September 18, 2022

Comments

  • Chittaranjan Nayak
    Chittaranjan Nayak almost 2 years

    I trying to build a rails application to upload large video file which will be hosted at s3.amazonaws.com server it works fine with smaller file but gives 413 Request entity too large error for large file (around 30MB). I change my nginx configuration file and increased client_max_body_size to 4G. Still it does not work.

    Can anybody help me ?

    • Adrian Heine
      Adrian Heine over 11 years
      Did you restart nginx after changing your configuration?
    • VBart
      VBart over 11 years
      What's in the error log?