atom feed8 messages in ru.sysoev.nginxRe: restrict access problem
FromSent OnAttachments
lhmwzySep 16, 2008 7:55 am 
lhmwzySep 16, 2008 7:59 am 
Igor SysoevSep 16, 2008 8:04 am 
lhmwzySep 16, 2008 8:32 am 
lhmwzySep 16, 2008 8:34 am 
Igor SysoevSep 16, 2008 8:53 am 
Igor SysoevSep 16, 2008 8:53 am 
lhmwzySep 16, 2008 9:15 am 
Subject:Re: restrict access problem
From:lhmwzy (lhm@gmail.com)
Date:Sep 16, 2008 7:59:27 am
List:ru.sysoev.nginx

I want to do a restrict access for URI contains xinxi,I do as follow:

location ~ xinxi { allow 10.68.49.21; auth_basic "need authried"; auth_basic_user_file passwd; deny all; }

when I access http://10.66.23.102/bxzx/xinxi/ from 10.68.49.210,nginx says "403 Forbidden". I think the rule checkorder is first "allow 10.68.49.21;" then " auth_basic "need authried";auth_basic_user_file passwd;" last "deny all" So when I access http://10.66.23.102/bxzx/xinxi/ from 10.68.49.210,nginx should prompt me to input username and password. Am I right?

Also I know the config location ~ xinxi { satisfy any; allow 10.68.49.21; auth_basic "need authried"; auth_basic_user_file passwd; deny all; } can do the job well.