###前提・実現したいこと
Apache2.4.25で特定のディレクトリにBasic認証の実装をしたい。
ただし、.htaccessは使用したくない。
環境
・raspberry pi 3
・Linux raspberrypi 4.9.41-v7+ #1023 SMP Tue Aug 8 16:00:15 BST 2017 armv7l GNU/Linux
・apache2.4.25
###発生している問題・エラーメッセージ
/etc/apache2/apache2.confにBasic認証の設定を行ったが反映されずに困っております。
エラーメッセージは表示されていません。
###該当の設定項目 /etc/apach2/apache2.conf
apache2.conf
1・・・略 2<Directory /> 3 Options FollowSymLinks 4 AllowOverride None 5 #Require all granted 6</Directory> 7 8<Directory /usr/share> 9 AllowOverride None 10 #Require all granted 11</Directory> 12 13<Directory /var/www/> 14 Options Indexes FollowSymLinks 15 AllowOverride None 16 #Require all granted 17</Directory> 18 19<Directory /var/www/html/post> 20 <Files ~ "^\.(htaccess|htpasswd)$"> 21 deny from all 22 </Files> 23 AuthUserFile /etc/apache2/.htpasswd 24 AuthName "basic auth" 25 AuthType Basic 26 require valid-user 27</Directory> 28・・・略
回答1件
あなたの回答
tips
プレビュー