ラボ > サーバ:.htaccess

BASIC認証をしようとしたらエラー(.htaccess)

BASIC認証をかけてからブラウザでアクセスするとBASIC認証のダイアログは出ずに「Internal Server Error(500)」が出てくる。

作成日:2018-10-18, 更新日:2018-10-18

基本

「AuthGroupfile」がいらないっぽい。

▼「.htaccess」「.htpasswd」のアクセスを禁止した上でBASIC認証。

<Files ~ "^\.(htaccess|htpasswd)$">
deny from all
</Files>
AuthUserfile /〇〇〇/.htpasswd
#AuthGroupfile /dev/null
AuthName "Please enter your ID and password"
AuthType Basic
require valid-user