Welcome! Log In Create A New Profile

Advanced

Re: How to block fake google spider and fake web browser access?

Francis Daly
May 06, 2015 02:48PM
On Tue, May 05, 2015 at 07:05:59PM -0400, meteor8488 wrote:

Hi there,

> location / {
> root /var/www;
>
> if ( $geo = "badip" ) {
> return 444;
> }
> if ( $geo = "spider" ) {
> set $spiderip 1;
> }

http://wiki.nginx.org/IfIsEvil

You are using "if" inside "location" and doing something other than
"return".

That combination makes it too hard for me to understand what is happening.

I won't be surprised to learn that that combination is the reason your
"deny" directives do not act the way you want them to.

It looks to me like you can safely move all of these "if"s to server{}
level, outside the location{}.


If you do that, does it change the response that you get at all?

Cheers,

f
--
Francis Daly francis@daoine.org

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

How to block fake google spider and fake web browser access?

meteor8488 May 05, 2015 08:38AM

Re: How to block fake google spider and fake web browser access?

meteor8488 May 05, 2015 09:07AM

Re: How to block fake google spider and fake web browser access?

unclepieman May 05, 2015 09:22AM

Re: How to block fake google spider and fake web browser access?

meteor8488 May 05, 2015 09:53AM

Re: How to block fake google spider and fake web browser access?

CJ Ess May 05, 2015 10:06AM

Re: How to block fake google spider and fake web browser access?

Francis Daly May 05, 2015 01:56PM

Re: How to block fake google spider and fake web browser access?

meteor8488 May 05, 2015 07:05PM

Re: How to block fake google spider and fake web browser access?

Francis Daly May 06, 2015 02:48PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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