access lists and auth basic

Igor Sysoev is at
Fri Jul 6 11:45:16 MSD 2007

On Fri, Jul 06, 2007 at 12:36:45PM +0930, Kingsley Foreman wrote:

> Hi guys,
> im trying to work out if something is possible while i try to move a server 
> from apache to nginx
> i currently have a .htaccess file that looks something like this
> require valid-user
> AuthType Basic
> AuthName "Admin Access Only"
> AuthUserFile /pwds
> Satisfy any
> order deny,allow
> allow from
> allow from
> deny from all
> Im trying to make it so that if the allow from addresses don't match it 
> will then try to use basic Auth instead,
> this method works in apache however i can get it to work in nginx, is it 
> possible to do it and if so how?

location /closed/ {

     satisfy_any  on;

     allow  ...;
     allow  ...;
     deny   all;

     auth_basic  "Admin Access Only";
     auth_basic_user_file  /pwds;


Igor Sysoev

More information about the nginx mailing list