change client_body_buffer_size from 16K to 256K made the nginx logs size from 50M to 1G..

meteor8488 nginx-forum at forum.nginx.org
Wed May 11 13:19:58 UTC 2016


Hi all, I just updated my configuration files as following	

	location ~ \.php$ {
			try_files $uri =404;
			if ($arg_mod = "upload" ) {
							return                 485;
							break;
						}
			if ($request_method = POST){
				return                 484;
				break;
						}
			error_page               484 = @post;
			error_page               485 = @flash;
			fastcgi_param  SCRIPT_FILENAME  /scripts$fastcgi_script_name;
			include        fastcgi_params;
			fastcgi_pass   backend;
		}
					location @post{
			internal;
			access_log /web/log/post.log  plog;
			try_files $uri =404;
			fastcgi_param  SCRIPT_FILENAME  /scripts$fastcgi_script_name;
			include        fastcgi_params;
			fastcgi_pass   backend;
			}
		location @flash{
			internal;
			access_log /web/log/flash.log  main;
			try_files $uri =404;
			fastcgi_param  SCRIPT_FILENAME  /scripts$fastcgi_script_name;
			include        fastcgi_params;
			fastcgi_pass   backend;
			}


I'm using if to check whether user want to upload a file or not.

But I know that if is evil, so how can achieve the same result without using
if?

Posted at Nginx Forum: https://forum.nginx.org/read.php?2,266793,266809#msg-266809



More information about the nginx mailing list