Nginxでbasic認証をかける

htpasswd -c /path/to/.htpasswd {user}
server {
  listen       80;

  location / {
    auth_basic "Basic Auth";
    auth_basic_user_file /path/to/.htpasswd;

    ...more something...
  }
}