nginxで特定ディレクトリをBasic認証から除外する方法

  • 23
    Like
  • 0
    Comment
More than 1 year has passed since last update.
server {
  listen               80;
  auth_basic           "auth";
  auth_basic_user_file /path/to/.htpasswd;
  root                 /path/to/root;
  location /path/to/exception {
    satisfy any;
    allow   all;
  }
}