Problem with client_max_body_size

dast@c-base dast at
Tue Feb 5 14:08:03 UTC 2013


i want to use Nginx with apache2 and mod_dav_svn for hosting my SVN Repository via https.

But i have problems on commit large files.

On a 8MB ffmpeg binary commit, my SVN client brings this error:
Commit failed (details follow):
Server sent unexpected return value (413 Request Entity Too Large) in response to PUT request for '/svn/repo1/!svn/wrk/b2f0560a-05fd-427c-9039-d47dea9ff9c4/path/ffmpeg'

The Nginx error log says:

2013/02/05 14:20:25 [error] 22931#0: *2693 client intended to send too large body: 8309431 bytes, client:, server:, request: "PUT /svn/repo1/!svn/wrk/b2f0560a-05fd-427c-9039-ababea9ff9c4/path/ffmpeg HTTP/1.1", host: ""

And nothing about the request in the apache logs.
So i think the nginx blocks the request, not the proxy to apache.

The Requests to the Nginx goes over HTTPS: (nginx)     <>    routing to http://localhost:8080  (apache2)

My Nginx config already has client_max_body_size 256M; in the nginx.conf inside http { } and server { } in the vost site config.
But it does not helps or is ignored.

i have searched all other nginx configfiles for "client_max_body_size" without succes:

#> grep -R 'client_max_body_size' ./*
./nginx.conf:   client_max_body_size    256M;
./sites-available/      client_max_body_size    256M;
./sites-available/      client_max_body_size    256M;
./sites-enabled/        client_max_body_size    256M;
./sites-enabled/        client_max_body_size    256M;

my site config file:

server {
	listen   443;

	client_max_body_size    256M;

	ssl    on;
	ssl_certificate    	/path/ssl-cert/nginx/;
	ssl_certificate_key     /path/ssl-cert/nginx/;

	access_log /path/logs/;
	error_log /path/logs/ debug;

	root /path/htdocs/;
	index index.php index.html;

	location / {
	    try_files $uri $uri/ /index.php;

	location /svn {
	    client_max_body_size    256M;
	    keepalive_timeout  60;
	    include         /etc/nginx/proxy_params;
	    set  $dest  $http_destination;
	    if ($http_destination ~ "^https://(.+)") {
	       set  $dest   http://$1;
	    proxy_set_header  Destination   $dest;


So, what can i check?
What is wrong in my config?
Why is client_max_body_size ignored?
Does client_max_body_size not work on https?
Does client_max_body_size not work on PUT requests?

After 2 days of testing i hav no idea that to check. :(

best regards,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the nginx mailing list