Avatar of reredok
Flag for Germany asked on

nginx Reverse Proxy in front of apache webdav upload file Problems

In a nutshell:
I use an apache2 as webdav server and have a nginx reverse proxy in front of it.
The download of larger files (~ 6 GB) works without problems only the upload of larger files (already from 450 MB) aborts exactly at the EOF with the error message "65 client intended to send too large body " (on nginx).

I tested all possible settings like client_max_body_size, proxy_buffering off; unfortunately without success. If I run apache2 without nginx reverse proxy everything works as expected.

Thanks for your help

Linux* NginxApache Web Server

Avatar of undefined
Last Comment
David Favor

8/22/2022 - Mon
Ravi Kumar Atrey

You need to configure upload size at every level, like in configuration of your application platform like if application is in php then it should be configured in PHP.ini file, then ngnix configuration and then apach's configuration.

Then you need to try.

Please do this and let me know if you have already done?

except for the configuration of php I configured it in nginx and apache2.
Ravi Kumar Atrey

Please do in PHP configuration as well.

Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!
Walt Forbes

php isn't installed: neither on the nginx nor apache server
Ravi Kumar Atrey

ok.. so how are you trying to upload, I mean what you are using to upload files, directly under your application or any some ftp sort of tool?
David Favor

Increasing client_max_body_size should fix this.

Likely best to install inotify-wait tools + watch all your config files. Then restart NGINX + ensure config file where you added the client_max_body_size change is actually read when NGINX restarts.
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.

@Ravi Kumar Atrey
Sorry, my information was a quick shot again.
Apache2 runs "of course" a webdav and nginx serves as an accelerator

@David Favor
client_max_body_size 2G; 20G; 200G; (nginx.conf, ../site-available/reserve-proxy.conf)
I tested in scope locaction, server, http and so on.

It must actually cause nginx the problem there without, so apache2 "alone" with webdav does not have the problem.
Prabhin MP

client_max_body_size        50m;

check this , this should solve the issue

here you will find further information. Unfortunately the upload to the webdav (apache2) via nginx still does not work.

monitoring filesaccess nginx:
/etc/nginx/nginx.conf OPEN
/etc/nginx/nginx.conf ACCESS
/etc/nginx/sites-available/reverse-proxy.conf OPEN
/etc/nginx/sites-available/reverse-proxy.conf ACCESS
/etc/nginx/sites-available/reverse-proxy.conf CLOSE_NOWRITE,CLOSE
/etc/nginx/nginx.conf CLOSE_NOWRITE,CLOSE

client_max_body_size in nginx files (client_max_body_size 50G;)
grep -ril 'client_max_body_size' /etc/nginx

webdav-client (carot-dav)

2019/01/18 08:17:32 9987#9987: *27 client intended to send too large body: 104857600 bytes, client:, server: ......., request: "PUT /webdav/DATEV/KassenundWarenerfassung/test/K$ ....
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
David Favor

You said, "I tested in scope locaction, server, http and so on."

Using inotifywait to verify the files your changing are actually be re-ingested, based on however you're restarting all your services.
David Favor

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question