Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

“413 Request Entity Too Large” Error #39

Closed
9cat opened this issue Oct 3, 2014 · 12 comments

Comments

@9cat
Copy link

commented Oct 3, 2014

base on: http://stackoverflow.com/questions/10454850/413-request-entity-too-large-error-rails-3-2-passenger-phusion?rq=1

you should add:

client_max_body_size 4g;
in http section in nginx.conf file.

@atmoz

This comment has been minimized.

Copy link

commented Oct 7, 2014

Yes please, I also got this problem.

1 similar comment
@jancelin

This comment has been minimized.

Copy link

commented Oct 14, 2014

Yes please, I also got this problem.

@jancelin

This comment has been minimized.

Copy link

commented Oct 14, 2014

add
client_max_body_size 500M ;
in
server {
https://github.com/jancelin/nginx-proxy/blob/master/nginx.tmpl

@atmoz

This comment has been minimized.

Copy link

commented Oct 15, 2014

I ended up using this fork: https://github.com/zedtux/nginx-proxy

@ReedD

This comment has been minimized.

Copy link

commented Oct 16, 2014

👍

@md5

This comment has been minimized.

Copy link
Contributor

commented Dec 7, 2014

There has been more recent discussion of this issue in #29.

@md5

This comment has been minimized.

Copy link
Contributor

commented Feb 23, 2015

I believe this can be closed since #106 was merged. See the README for instructions: https://github.com/jwilder/nginx-proxy/blob/master/README.md#custom-nginx-configuration

@jwilder jwilder closed this Mar 4, 2015
vinta added a commit to vinta/HAL-9000 that referenced this issue Sep 7, 2016
@hk0i

This comment has been minimized.

Copy link

commented Jan 13, 2018

I'm not super knowledgeable about nginx, is that nginx.tmpl usable as-is? When I drop in the template under my vhosts.d I get a 503. I see that there's some kind of templating going on with the {{ }} but I don't know if that's something from NGINX or something else. Either way I am not too sure why it's not working, I really just want to increase the client_max_body_size for my dev environment only and only for one particular vhost.

Scratch that, I was actually mounting to vhosts.d and not vhost.d (spelling). I still can't seem to get it to work right but I'll dig around more in the container and see what's happening.

Update I got it working! The problem was that I thought I had to come up with a completely new config because the docs mention something about checking the template to make sure you have everything you need, but when I looked at the template more closely I realized it was just including my vhost config inside of the server { block so all I had to do was add the one option I wanted in my file.

The other confusion was that the file should be named exactly as the host, when I was reading the doc I misinterpreted the mention of .conf to mean that it had to be my.host.conf

So in my case vhost.d/some.long.domain.com contains only:

client_body_max_size 500M

That seems to work. In case anyone else stumbles across this who misunderstood the docs.

@kamil-kielczewski

This comment has been minimized.

Copy link

commented Jan 13, 2018

I have in past similar problem (in PHP, docker):
https://stackoverflow.com/q/44605469/860099

@hk0i

This comment has been minimized.

Copy link

commented Jan 13, 2018

Thanks! I wish I had seen that sooner. It's so succinct.

@egorpavlikhin

This comment has been minimized.

Copy link

commented Feb 1, 2018

client_body_max_size 500M

Correct term is client_max_body_size

@jasonheecs

This comment has been minimized.

Copy link

commented Jul 19, 2018

Run into this issue as well. I made a derived docker image that increases the max upload size to 10 MB: https://github.com/jasonheecs/docker-nginx-proxy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
10 participants
You can’t perform that action at this time.