![Apache 2.4 の「require host not」は動作しますが、Apache エラー ログに AH01753 [authz_host:error] が繰り返し表示されます。](https://rvso.com/image/1576485/Apache%202.4%20%E3%81%AE%E3%80%8Crequire%20host%20not%E3%80%8D%E3%81%AF%E5%8B%95%E4%BD%9C%E3%81%97%E3%81%BE%E3%81%99%E3%81%8C%E3%80%81Apache%20%E3%82%A8%E3%83%A9%E3%83%BC%20%E3%83%AD%E3%82%B0%E3%81%AB%20AH01753%20%5Bauthz_host%3Aerror%5D%20%E3%81%8C%E7%B9%B0%E3%82%8A%E8%BF%94%E3%81%97%E8%A1%A8%E7%A4%BA%E3%81%95%E3%82%8C%E3%81%BE%E3%81%99%E3%80%82.png)
ホスティング プロバイダーが 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#ホスト名ルックアップ