Apache2.4で「AH01630: client denied by server configuration」解決方法
Apache2.4以前では問題なかった
だった、.conf
若しくはネットで調べた内容を元に
を作成したが、.conf
Apache2.4にその
を入れて実際アクセスしてみると下記のようなエラーが出ることがあります。.conf
Forbidden
You don't have permission to access /var/www/html/test.html on this server.
そして、Apacheのerror_logを見ると、
AH01630: client denied by server configuration: test.html
このエラーが出力されている場合の解決方法を今回ポストします。
解決方法
下記のように書かれているところを
<Directory "/var/www/html">
Order allow,deny
Allow from all
</Directory>
このように
に変えます。Require all granted
<Directory "/var/www/html">
Require all granted
</Directory>
原因
Apache2.4になってから書き方変わったから。
参考
これについての公式の文書はこれを見てみてください。
https://httpd.apache.org/docs/2.4/mod/mod_authz_core.html#require
「特定のIPアドレスやホストのアクセスを許可しない」など、細かい設定をしたい場合は、こちらのポストも参照して見てください。
http://www.nofuture.tv/diary/20130813.html
ディスカッション
コメント一覧
まだ、コメントがありません