IP-based HTTP auth

Shamsundar Dileep lists at ruby-forum.com
Wed Oct 8 21:04:10 MSD 2008


Reinis Rozitis wrote:
>> Auth does not work in the scope of if, what else can I do? Thanks.
> 
> 
> You are missing 'satisfy  any;'
> Try this:
> 
> location / {
>   satisfy  any;
> 
>   allow 192.1.1.1;
>   auth_basic            "Restricted";
>   auth_basic_user_file  /usr/local/nginx/conf/htpasswd;
> 
>    deny   all;
> }

That doesn't seem to work, I simply get a 403 forbidden for any request. 
It looks like there's a related thread:
http://www.ruby-forum.com/topic/165862
Unfortunately I didn't quite understand Igor's suggestions there or 
whether  lhmwzy's problem was resolved or not.
-- 
Posted via http://www.ruby-forum.com/.





More information about the nginx mailing list