Forum: NGINX How can i block these requests

2974d09ac2541e892966b762aad84943?d=identicon&s=25 nilesh (Guest)
on 2012-10-29 14:10
(Received via mailing list)
I am getting following access.log: and are significant in number
RequestMethod=- RequestURI=- HTTPStatus=400  BodyBytesSent=0
RequestTime=0.000  ResponseTime=-  HTTPReferrer="-" UserAgent="-"
X-Forwarded-For=- HTTPStatus=400

Does anyone know why i am getting these empty requests, and how to stop
them.

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,232321,232321#msg-232321
79518c99454864df949f8c675283698b?d=identicon&s=25 Edho Arief (Guest)
on 2012-10-29 14:13
(Received via mailing list)
On Oct 29, 2012 8:09 PM, "nilesh" <nginx-forum@nginx.us> wrote:
>
> I am getting following access.log: and are significant in number
> RequestMethod=- RequestURI=- HTTPStatus=400  BodyBytesSent=0
> RequestTime=0.000  ResponseTime=-  HTTPReferrer="-" UserAgent="-"
> X-Forwarded-For=- HTTPStatus=400
>
> Does anyone know why i am getting these empty requests, and how to stop
> them.
>

That's modern browser's keepalive

> Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,232321,232321#msg-232321
29e04db6758ef073a3dddedd88a5d845?d=identicon&s=25 Ranjib Dey (Guest)
on 2012-10-30 06:14
(Received via mailing list)
Thanks for the pointer Edho,
right now we are getting these log entries at a rate of 5000 per hour
per
server, and we have multiple nginx installations, and this is almost
flooding our centralized logging system. Is there a way to disable
logging
such requests, or lower the number of occurrences (like tweaking the
keep
alive timeout value or number of requests)?

thanks in advance
ranjib
79518c99454864df949f8c675283698b?d=identicon&s=25 Edho Arief (Guest)
on 2012-10-30 06:20
(Received via mailing list)
On Tue, Oct 30, 2012 at 12:13 PM, Ranjib Dey <dey.ranjib@gmail.com>
wrote:
>
Maybe something like this will work (untested)

error_page 400 /400.html;
location = /400.html {
  access_log off;
}
Please log in before posting. Registration is free and takes only a minute.
Existing account

NEW: Do you have a Google/GoogleMail, Yahoo or Facebook account? No registration required!
Log in with Google account | Log in with Yahoo account | Log in with Facebook account
No account? Register here.