ホスティング プロバイダーが Apache 2.2 から Apache 2.4 に移行した後、何か気になることがあります。
.htaccessにApache 2.2のルールがありました
order allow,deny
deny from domain.tld
deny from 1.2.3.4
allow from all
これらのルールはApache 2.4では500番台になったので、Apache 2.4のマニュアルとWebを調べて、最終的に
<RequireAll>
Require all granted
Require not host domain.tld
Require not ip 1.2.3.4
</RequireAll>
私は自分のIPアドレスとドメインでこれをテストしましたが、Apacheは403を返します。しかし、Apacheのエラーログには
<Thu Dec 06 20:16:51.641853 2018> <authz_host:error> <pid 1347506:tid 140612011235072> <client 86.90.6.41:42035> AH01753: access check of 'domain.tld' to /index.html failed, reason: unable to get the remote host name
そこには何と書いてあるのでしょうか? また、htaccess に「Require not host」ルールが複数あるため、htaccess のすべてのエントリでこの「AH017053」エラーが繰り返されます。これは訪問者が要求したすべてのファイルに対して行われるため、index.html の後は「index.css」などでこのエラーが繰り返されます。
このエラーをなくしたいのですが、どうすればいいかわかりません。また、テスト状況で Apache がまだ自分の IP アドレスとドメイン名をブロックしている場合、このエラーは何を言おうとしているのでしょうか?
もう読んだApache 2.4 の ...よく分かりませんが、Apache が 'AH017053' についてエラーを報告した場合、どこかでそれを調べることはできないのでしょうか?
答え1
ここで答えを見つけましたApache 2.4 の ...
の代わりに
Require not host domain.tld
二重逆引きの試行を停止します
Require not forward-dns domain.tld
その理由はここで説明されているhttps://httpd.apache.org/docs/2.4/mod/core.html#ホスト名ルックアップ