Welcome! Log In Create A New Profile

Advanced

Re: nginx.conf

December 16, 2016 02:02AM
‎Take a look at this:
‎http://ask.xmodulo.com/block-specific-user-agents-nginx-web-server.html

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@nginx.org
Reply To: nginx@nginx.org
Subject: Re: nginx.conf

If I delete the if!

I get an error

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

Posted at Nginx Forum: https://forum.nginx.org/read.php?2,271581,271585#msg-271585

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

nginx.conf

xstation December 16, 2016 12:57AM

Re: nginx.conf

c0nw0nk December 16, 2016 01:05AM

Re: nginx.conf

xstation December 16, 2016 01:17AM

Re: nginx.conf

xstation December 16, 2016 01:34AM

Re: nginx.conf

c0nw0nk December 16, 2016 01:55AM

Re: nginx.conf

xstation December 16, 2016 03:45AM

Re: nginx.conf

gariac December 16, 2016 02:02AM

Re: nginx.conf

gariac December 16, 2016 04:40AM

Re: nginx.conf

xstation December 17, 2016 08:21AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 94
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready