Forum: NGINX Nginx modules

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
E4c87ec7a351ceacf4be58dd6defc93e?d=identicon&s=25 Df As (2009do)
on 2009-02-16 06:31
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;

Please help me
5640e332954fc0006aea97a155ce0afd?d=identicon&s=25 Igor Sysoev (Guest)
on 2009-02-16 10:05
(Received via mailing list)
On Mon, Feb 16, 2009 at 06:31:35AM +0100, Df As wrote:

> I got this solution
> I want to know whether i have to specify my domain or invalid referer
>  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;
1eff96b7abc66cfd99ab06db46ac6863?d=identicon&s=25 Mohamed Yusuf (visityusuf)
on 2009-03-10 06:15
Igor Sysoev wrote:
> On Mon, Feb 16, 2009 at 06:31:35AM +0100, Df As wrote:
>
>> I got this solution
>> I want to know whether i have to specify my domain or invalid referer
>>  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;



Hi ,

I am Yusuf .  How Can I block only www.games.com URL?... ( Only this
URL)...


If I use "valid_referers   none  blocked  www.ads.com  ads.com;" - It
will allow only this URL. But I want to allow all URLs except
www.games.com...


Please Help me the resolve this issue...

Thanks to everybody


-- Mohamed Yusuf A.L.
1eff96b7abc66cfd99ab06db46ac6863?d=identicon&s=25 Mohamed Yusuf (visityusuf)
on 2009-03-10 07:08
Mohamed Yusuf wrote:
> Igor Sysoev wrote:
>> On Mon, Feb 16, 2009 at 06:31:35AM +0100, Df As wrote:
>>
>>> I got this solution
>>> I want to know whether i have to specify my domain or invalid referer
>>>  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;
>
>
>
Hi ,

 I am Yusuf .  How Can I block only www.games.com URL?... ( Only this
 URL)...


 If I use "valid_referers   none  blocked  www.ads.com  ads.com;" - It
 will allow only this URL. But I want to allow all URLs except
 www.games.com...


 Please Help me to resolve this issue...


 Thanks to everybody


 -- Mohamed Yusuf A.L.
This topic is locked and can not be replied to.