nginx logging issue
s.k
sandyk007 at rediffmail.com
Mon May 25 14:34:59 MSD 2009
s.k wrote:
>
> Hi,
>
> I m quite new to nginx; but have used this for pop proxy; light webservers
> & quite fascinated with the results.
>
> Right now facing part as far logging is concerned. I certain hits in logs;
> which are just opening connections & dont transmit anything & close the
> connection or are disconnected after time-outs. So some entries of no
> requests format & error as 408 get recorded in logs; which makes
> centralised logging system go hay-wire.
>
> I would like to avoid logging such entries as done in apache; which does
> not logs 400 or 408 or any telnet requests w/o passing any headers.
>
> Some of options tried are as follows (but havent helped) :
>
> ## Only allow GET and HEAD request methods
> if ($request_method !~ ^(GET|HEAD|POST)$ ) {
> return 444;
>
> Access log:
>
> log_format main '$remote_addr - $remote_user [$time_local] "$request"
> '
> '$status $body_bytes_sent "$http_referer" '
> '"$http_user_agent" "$http_cookie" ';
>
> Any help you would be highly appreciable.
>
> Regs,
> San K
>
>
> 89.5.0.243 - - [25/May/2009:14:27:54 +0530] "-" 408 0 "-" "-" "-"
> XXX.XXX.XXX.5 - - [25/May/2009:14:26:32 +0530] "GET /health.htm HTTP/1.1"
> 200 3 "-" "-" "-"
> XXX.XXX.XXX.6 - - [25/May/2009:14:26:23 +0530] "GET /health.htm HTTP/1.1"
> 200 3 "-" "-" "-"
> 67.161.28.173 - - [25/May/2009:14:26:22 +0530] "-" 400 0 "-" "-" "-"
>
>
--
View this message in context: http://n2.nabble.com/nginx-logging-issue-tp2968635p2968989.html
Sent from the nginx mailing list archive at Nabble.com.
More information about the nginx
mailing list