Nginx modules

Igor Sysoev is at rambler-co.ru
Mon Feb 16 11:54:10 MSK 2009


On Mon, Feb 16, 2009 at 06:31:35AM +0100, Df As wrote:

> 
> hi,
> 
> I am new to this platform, i want to configure nginx to my site.
> 
> For example, my domain name is ??ads.com?? I want to block access to the
> site with the incorrect values. I am getting incorrect values from
> ??games.com??. I want to block those who are all sending incorrect values
> from ??games.com??.
> 
> I got this solution
> 
> 
> location /photos/ {
>          valid_referers   none  blocked  www.mydomain.com  mydomain.com;
> 
>          if ($invalid_referer) {
>              return   403;
>          }
>     }
> 
> I want to know whether i have to specify my domain or invalid referer
> domain
> 
> example
> 
> I have to specify like this
> 
>  valid_referers   none  blocked  www.ads.com  ads.com;
> 
>            [or]
> 
>  valid_referers   none  blocked  www.games.com  games.com;

As www.ads.com is valid referer, you should use

    valid_referers   none  blocked  www.ads.com  ads.com;


-- 
Igor Sysoev
http://sysoev.ru/en/





More information about the nginx mailing list