basic_authメモ

htpasswdファイル作成

htpasswd -bc /etc/httpd/basic/.htpasswd {user} {pass}

Apache2.4

<Directory "/var/www/vhosts/example.com">
  Options All -Indexes
  AllowOverride All
  #Require all granted

  AuthUserFile /etc/httpd/basic/.htpasswd
  AuthGroupFile /dev/null
  AuthName "Basic Auth"
  AuthType Basic
  Require valid-user
</Directory>