lists at lists at
Fri Dec 16 06:51:05 UTC 2016

‎Take a look at this:

Personally, I would use the map feature since eventually there will be other user agents to block.

I use three maps. I block based on requests, referrals, and ‎user agents. The user agent is kind of obvious. Unwanted referrals is a personal thing. I find some websites linking to me that are pure crap like stumbleupon. I don't want their traffic. Yeah sometimes stumbleupon has a relevant link, but most of the time their links make no sense. Some sites will link to your website for SEO. Some linking is just freakin out there, like when Hamas linked to my site. (Humus I like...Hamas not so much. )

Blocking requests is useful if you want to get the IPs of hackers. I find many requests for the directory "backup."‎ I even have the Chinese equivalent to backup in my bad request trap. Rather than let them 404, I 444 them, and then check the IP to see if it goes to a hosting company, VPS, VPN, etc. You can't block enough IPs at the firewall in my opinion.

Every IP you block that isn't an eyeball, even if harmless today, might be harmful in the future. No eyeballs, no need to view the site.

  Original Message  
From: xstation
Sent: Thursday, December 15, 2016 10:35 PM
To: nginx at
Reply To: nginx at
Subject: Re: nginx.conf

If I delete the if!

I get an error

root at mail:~# nginx -t -c /etc/nginx/nginx.conf
nginx: [emerg] unknown directive "($http_user_agent" in
nginx: configuration file /etc/nginx/nginx.conf test failed

Posted at Nginx Forum:,271581,271585#msg-271585

nginx mailing list
nginx at

More information about the nginx mailing list