We help IT Professionals succeed at work.

nginx Reverse Proxy in front of apache webdav upload file Problems

reredok
reredok asked
on
388 Views
Last Modified: 2019-01-19
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

reredok
Comment
Watch Question

Ravi Kumar AtreyCloud Specialist- Azure
CERTIFIED EXPERT

Commented:
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?
reredokIT Consultant

Author

Commented:
except for the configuration of php I configured it in nginx and apache2.
Ravi Kumar AtreyCloud Specialist- Azure
CERTIFIED EXPERT

Commented:
Please do in PHP configuration as well.

upload_max_filesize=
post_max_size=
reredokIT Consultant

Author

Commented:
php isn't installed: neither on the nginx nor apache server
Ravi Kumar AtreyCloud Specialist- Azure
CERTIFIED EXPERT

Commented:
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 FavorFractional CTO
CERTIFIED EXPERT
Distinguished Expert 2019

Commented:
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.
reredokIT Consultant

Author

Commented:
@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 MPDevOps Engineer
CERTIFIED EXPERT
Distinguished Expert 2018

Commented:
client_max_body_size        50m;

check this , this should solve the issue
reredokIT Consultant

Author

Commented:
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
/etc/nginx/sites-available/reverse-proxy.conf
/etc/nginx/nginx.conf

webdav-client-error
webdav-client (carot-dav)

/var/log/nginx/error.log
2019/01/18 08:17:32 9987#9987: *27 client intended to send too large body: 104857600 bytes, client: 37.209.113.138, server: ......., request: "PUT /webdav/DATEV/KassenundWarenerfassung/test/K$ ....
David FavorFractional CTO
CERTIFIED EXPERT
Distinguished Expert 2019

Commented:
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.
Fractional CTO
CERTIFIED EXPERT
Distinguished Expert 2019
Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.