Sign up ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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
share|improve this question
This question is a duplicate of… – Mark Stosberg May 29 '12 at 15:16

1 Answer 1


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

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

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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