###前提
さくらのvpsにて
/var/www/html 配下にベーシック認証を掛けたい
htaccess
1AuthUserFile /var/www/html/.htpasswd 2AuthName "Please enter your ID and password" 3AuthType Basic 4require valid-user
html配下の別ディレクトリにて、掛けていたベーシック認証を
html全体にかけたいと思い、AuthUserFileを変更し、移動したところ効かなくなった。
また、元の位置に戻しても効かない。
###起きている現象
以前にpassが通らないケースはあったのですが、
ベーシック認証自体が出てこない
###試したこと
php
1<?php 2if ( file_exists( "/var/www/html/.htaccess" )) { 3 echo "ファイルが存在する!!"; 4} else { 5 echo "ファイルが存在しない!!"; 6} 7?>
上記実施したところファイルは存在していました。
conf
1<Directory "/var/www/html"> 2 3# 4# Possible values for the Options directive are "None", "All", 5# or any combination of: 6# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews 7# 8# Note that "MultiViews" must be named *explicitly* --- "Options All" 9# doesn't give it to you. 10# 11# The Options directive is both complicated and important. Please see 12# http://httpd.apache.org/docs/2.2/mod/core.html#options 13# for more information. 14# 15 Options Indexes FollowSymLinks 16 17# 18# AllowOverride controls what directives may be placed in .htaccess files. 19# It can be "All", "None", or any combination of the keywords: 20# Options FileInfo AuthConfig Limit 21# 22 AllowOverride All 23 24# 25# Controls who can get stuff from this server. 26# 27 Order allow,deny 28 Allow from all 29 30</Directory> 31
こちら、httpd.confの一部分です。
何か設定が間違っているのでしょうか?
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2019/02/27 09:31
退会済みユーザー
2019/02/27 09:37
2019/02/27 09:46
2019/02/28 03:08