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..

Valentin V. Bartenev
May 11, 2016 09:52AM
On Wednesday 11 May 2016 09:19:58 meteor8488 wrote:
> 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?
>
[..]

Please, check the "if=" parameter of the "access_log" directive.
See the docs: http://nginx.org/en/docs/http/ngx_http_log_module.html#access_log

wbr, Valentin V. Bartenev

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
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: 54
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready