Access restriction only for people outside LAN

Tomasz Pajor nikon at puffy.pl
Mon Sep 28 14:29:40 MSD 2009


> On Mon, Sep 28, 2009 at 11:58:21AM +0200, Tomasz Pajor wrote
>> You could try something like this.
>>
>> geo $need_auth {
>>     default 1;
>>     192.168.1.0/24 0;
>> }
>>
>> server {
>>     ...
>>     location / {
>>         if ($need_auth) {
>>             <auth>
>>         }
>>     }
>> }
>>     
>
> "satisfy  any" is better;
>   
good to know, thanks!





More information about the nginx mailing list