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


location / {
    root /home/www/site1/private;
    satisfy  any;
    deny   all;

    auth_basic            "MySite";
    auth_basic_user_file  /home/www/site1-passwd;
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.