nginx auth password or ip
in apache i could have a Satisfy Any directive, allowing access without password from a specified IP.
how to do with nginx?
<Directory /home/www/site1/private>
AuthUserFile /home/www/site1-passwd
AuthType Basic
AuthName MySite
Require valid-user
Order allow,deny
Allow from 172.17.10
Satisfy any
</Directory>
Easy:
location / {
root /home/www/site1/private;
satisfy any;
allow 172.17.10.0/24;
deny all;
auth_basic "MySite";
auth_basic_user_file /home/www/site1-passwd;
}