Welcome! Log In Create A New Profile

Advanced

Q about don't log 400 errors

Aleksandar Lazic
September 15, 2012 06:54AM
Hi,

I have follow the instruction on

http://wiki.nginx.org/HWLoadbalancerCheckErrors

but I still get the 400 entries in the access log.

Please can anybody help, thanks.

Cheers Aleks

/opt/nginx/installed/sbin/nginx -V
nginx version: nginx/1.3.4
built by gcc 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5)
TLS SNI support enabled
configure arguments: --prefix=/opt/nginx/installed
--conf-path=/opt/nginx/conf/nginx.conf --with-file-aio
--with-http_ssl_module --with-http_realip_module
--with-http_geoip_module --with-http_gzip_static_module
--with-http_secure_link_module --with-http_stub_status_module
--without-http_ssi_module
--http-client-body-temp-path=/opt/global_dir/temp_paths/client-body
--http-proxy-temp-path=/opt/global_dir/temp_paths/http-proxy
--http-fastcgi-temp-path=/opt/nginx/global_dir/fastcgi
--http-uwsgi-temp-path=/opt/global_dir/temp_paths/uwsgi
--http-scgi-temp-path=/opt/global_dir/temp_paths/scgi --with-debug
--pid-path=/opt/global_dir/logs
--error-log-path=/opt/global_dir/logs/default_error.log
--http-log-path=/opt/global_dir/logs/default_access.log
--pid-path=/opt/nginx/logs/nginx.pid


### nginx.conf

http {
....
geo $remote_addr $is_lb_400 {
default 0;
127.0.0.1/32 1;
}
....
server {
...
error_page 400 /400;

location = /400 {
if ($is_lb_400) {
access_log off;
}
return 400;
}
...
}
###

###
2012/09/15 12:46:22 [debug] 24085#0: *131110 accept: 127.0.0.1 fd:4
2012/09/15 12:46:22 [debug] 24085#0: *131110 event timer add: 4:
60000:1347706042790
2012/09/15 12:46:22 [debug] 24085#0: *131110 epoll add event: fd:4 op:1
ev:80000001
2012/09/15 12:46:22 [debug] 24085#0: *131110 malloc:
0000000000DDE9B0:1280
2012/09/15 12:46:22 [debug] 24085#0: *131110 posix_memalign:
0000000000E1DA80:256 @16
2012/09/15 12:46:22 [debug] 24085#0: *131110 malloc:
0000000000E1DB90:1024
2012/09/15 12:46:22 [debug] 24085#0: *131110 posix_memalign:
0000000000D56690:4096 @16
2012/09/15 12:46:22 [debug] 24085#0: *131110 http process request line
2012/09/15 12:46:22 [debug] 24085#0: *131110 recv: fd:4 0 of 1024
2012/09/15 12:46:22 [info] 24085#0: *131110 client prematurely closed
connection while reading client request line, client: 127.0.0.1, server:
domain.com
2012/09/15 12:46:22 [debug] 24085#0: *131110 http finalize request:
400, "?" a:1, c:1
2012/09/15 12:46:22 [debug] 24085#0: *131110 http terminate request
count:1
2012/09/15 12:46:22 [debug] 24085#0: *131110 http terminate cleanup
count:1 blk:0
2012/09/15 12:46:22 [debug] 24085#0: *131110 http request count:1 blk:0
2012/09/15 12:46:22 [debug] 24085#0: *131110 http close request
2012/09/15 12:46:22 [debug] 24085#0: *131110 http log handler
2012/09/15 12:46:22 [debug] 24085#0: *131110 free: 0000000000D56690,
unused: 2031
2012/09/15 12:46:22 [debug] 24085#0: *131110 close http connection: 4
2012/09/15 12:46:22 [debug] 24085#0: *131110 event timer del: 4:
1347706042790
2012/09/15 12:46:22 [debug] 24085#0: *131110 reusable connection: 0
2012/09/15 12:46:22 [debug] 24085#0: *131110 free: 0000000000E1DB90
2012/09/15 12:46:22 [debug] 24085#0: *131110 free: 0000000000DDE9B0
2012/09/15 12:46:22 [debug] 24085#0: *131110 free: 0000000000D54AB0,
unused: 8
2012/09/15 12:46:22 [debug] 24085#0: *131110 free: 0000000000E1DA80,
unused: 128
###

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Q about don't log 400 errors

Aleksandar Lazic September 15, 2012 06:54AM

Re: Q about don't log 400 errors

Maxim Dounin September 18, 2012 03:36AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 219
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