Welcome! Log In Create A New Profile

Advanced

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

May 11, 2016 09:19AM
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?
Subject Author Posted

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

meteor8488 May 11, 2016 01:39AM

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

Francis Daly May 11, 2016 03:38AM

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

meteor8488 May 11, 2016 07:26AM

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

meteor8488 May 11, 2016 09:19AM

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

Valentin V. Bartenev May 11, 2016 09:52AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 170
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready