nginx-proxy-manager icon indicating copy to clipboard operation
nginx-proxy-manager copied to clipboard

413 Request Entity Too Large

Open nfacha opened this issue 4 years ago • 38 comments

Checklist

  • Have you pulled and found the error with jc21/nginx-proxy-manager:latest docker image? Yes

  • Are you sure you're not using someone else's docker image? Yes

  • If having problems with Lets Encrypt, have you made absolutely sure your site is accessible from outside of your network? Yes, but not related

Describe the bug File uploads trigger 413 Request Entity Too Large Setting the advanced config client_max_body_size 100m; takes no effect and the problem persists

To Reproduce Steps to reproduce the behavior:

  1. Upload a larger file on a website going thru the proxy, 413
  2. Set an appropriate client_max_body_size
  3. try to upload again
  4. See a 413

Expected behavior client_max_body_size would take effect and allow the upload as it does with regular nginx

Screenshots If applicable, add screenshots to help explain your problem.

nfacha avatar Feb 23 '21 20:02 nfacha

I'm having the same issue.

Ey3scr34m avatar Mar 02 '21 13:03 Ey3scr34m

same issue when try to upload iso to proxmox

centralhardware avatar Mar 26 '21 06:03 centralhardware

Hi, I have found a solution. you can enter client_max_body_size in the costome file server_proxy.conf, then it works. You can read here where and how to create the file.

ichbinder avatar May 25 '21 19:05 ichbinder

At the Edit Proxy Host window, click Custom locations and click the gear button, set the following attributes to an appropriate value image

Mano-Liaoyan avatar Jan 14 '22 15:01 Mano-Liaoyan

Hi, I have found a solution. you can enter client_max_body_size in the costome file server_proxy.conf, then it works. You can read here where and how to create the file.

I went into NPM docker files, I added the server_proxy.conf file and added this line: "client_max_body_size 0;"

It still doesn't work. I also tried adding it to seafhttp like the picture above and that didn't work either. I still get 413 error.

jenny787 avatar Mar 21 '22 22:03 jenny787

I have the same issue

jeffryjdelarosa avatar Mar 23 '22 12:03 jeffryjdelarosa

I have now tried this in all sorts of ways, and it never works. Nothing seems to change the NPM behavior. I thought it was something to configure on Seafile's side, but I tried it with different webdav servers and all of them will return 413. There is no way to fix this. Seems like there is something hardcoded in NPM.

jenny787 avatar Mar 28 '22 21:03 jenny787

I have now tried this in all sorts of ways, and it never works. Nothing seems to change the NPM behavior. I thought it was something to configure on Seafile's side, but I tried it with different webdav servers and all of them will return 413. There is no way to fix this. Seems like there is something hardcoded in NPM.

There’s a nothing to work with it. I should have to switch to Haproxy because I have a Client.

jeffryjdelarosa avatar Mar 28 '22 22:03 jeffryjdelarosa

At the Edit Proxy Host window, click Custom locations and click the gear button, set the following attributes to an appropriate value image

This not work at all.

jeffryjdelarosa avatar Mar 28 '22 22:03 jeffryjdelarosa

Having the same issue.

jk111 avatar Apr 08 '22 18:04 jk111

i found out the issue. it's not nginx. it's cloudflare. they have 100mb limit. nothing you can do.

jenny787 avatar Apr 09 '22 01:04 jenny787

i found out the issue. it's not nginx. it's cloudflare. they have 100mb limit. nothing you can do.

I don’t have CloudFlare, I have different clients with they own hosting so it’s nginx ,

jeffryjdelarosa avatar Apr 09 '22 01:04 jeffryjdelarosa

oh ok! then please let us know if you come up with anything. I've tried everything i could think of.

jenny787 avatar Apr 09 '22 02:04 jenny787

it works, when set the advanced tab image

yoution avatar Apr 13 '22 07:04 yoution

it works, when set the advanced tab image

What version do you have? because it doesn't work to me. I have the lastest one.

jeffryjdelarosa avatar Apr 13 '22 15:04 jeffryjdelarosa

it works, when set the advanced tab image

What version do you have? because it doesn't work to me. I have the lastest one.

I install it in docker, the docker version is jc21/nginx-proxy-manager:latest

yoution avatar Apr 14 '22 05:04 yoution

it works, when set the advanced tab image

What version do you have? because it doesn't work to me. I have the lastest one.

I install it in docker, the docker version is jc21/nginx-proxy-manager:latest

Didn’t work to me.

jeffryjdelarosa avatar Apr 18 '22 14:04 jeffryjdelarosa

None of above solutions worked for me.

JustinChasez avatar May 17 '22 08:05 JustinChasez

app.use(BodyParser.json({ limit: '50mb' }))
app.use(BodyParser.urlencoded({ limit: '50mb', extended: true }));

ignaciochemes avatar May 20 '22 17:05 ignaciochemes

app.use(BodyParser.json({ limit: '50mb' }))
app.use(BodyParser.urlencoded({ limit: '50mb', extended: true }));

This solved my problem. Koa reported the same error, which led me to mistake it for nginx.

yuri2peter avatar Oct 14 '22 18:10 yuri2peter

Could you please let know where I can do it .

jeffryjdelarosa avatar Oct 14 '22 19:10 jeffryjdelarosa

```js
app.use(BodyParser.json({ limit: '50mb' }))
app.use(BodyParser.urlencoded({ limit: '50mb', extended: true }));

This solved my problem. Koa reported the same error, which led me to mistake it for nginx.

Could you explain me the step to reproduce

jeffryjdelarosa avatar Oct 14 '22 19:10 jeffryjdelarosa

```js
app.use(BodyParser.json({ limit: '50mb' }))
app.use(BodyParser.urlencoded({ limit: '50mb', extended: true }));

This solved my problem. Koa reported the same error, which led me to mistake it for nginx.

Could you explain me the step to reproduce

import express from "express";
const app = express();
app.use(BodyParser.json({ limit: '50mb' }))
app.use(BodyParser.urlencoded({ limit: '50mb', extended: true }));

ignaciochemes avatar Oct 14 '22 19:10 ignaciochemes

it works, when set the advanced tab image

This absolutely worked for me. Make sure you don't have any other servers between the client and your application (CF, another nginx server between NPManager and your app for hosting static files, etc.) and that your application itself is configured to allow large requests.

golyalpha avatar Dec 08 '22 18:12 golyalpha

it works, when set the advanced tab image

This absolutely worked for me. Make sure you don't have any other servers between the client and your application (CF, another nginx server between NPManager and your app for hosting static files, etc.) and that your application itself is configured to allow large requests.

Worked for me. I realised I had another proxy server in front of NPM. So I updated the client_max_body_size for that server too

dkyeremeh avatar Mar 25 '23 13:03 dkyeremeh

It works!

I pushed a giant (13GiB) docker container image to harbor via nginxproxymanager as a reverse proxy service. I did it.

LittleNewton avatar Jul 30 '23 17:07 LittleNewton

This is something that have never worked to me

image

image

jeffryjdelarosa avatar Jul 31 '23 00:07 jeffryjdelarosa

I have the same issue, setting client_max_body_size 0; in the advanced tab does not help. How can I debug this?

ymoona avatar Sep 06 '23 18:09 ymoona

@jeffryjdelarosa @ymoona are you guys sure that there's nothing else between your client and the destination, including the destination itself, that would be blocking too large requests?

If you don't know, and don't have an easy way of telling, you can try to use the HTTP TRACE method combined with the Max-Forwards header to get requests from the intermediate servers - that of course depends on the intermediate servers honouring TRACE and properly decrementing/reflecting requests back based on the header value.

golyalpha avatar Sep 20 '23 12:09 golyalpha

@jeffryjdelarosa @ymoona are you guys sure that there's nothing else between your client and the destination, including the destination itself, that would be blocking too large requests?

If you don't know, and don't have an easy way of telling, you can try to use the HTTP TRACE method combined with the Max-Forwards header to get requests from the intermediate servers - that of course depends on the intermediate servers honouring TRACE and properly decrementing/reflecting requests back based on the header value.

No it's not. because it's my own Server, I've test it without proxy, I mean by VPN and do it direct to IP. and Ngnix are blocking the Large Request and evemore there's some request that can take later longer and ngninx stop it or cancel that request.

jeffryjdelarosa avatar Sep 20 '23 13:09 jeffryjdelarosa