Welcome! Log In Create A New Profile

Advanced

Re: nginx logging issue

s.k
May 25, 2009 06:34AM
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.
Subject Author Posted

Re: nginx logging issue

s.k May 25, 2009 06:34AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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