0
私の最終的な子は、すべてのサブドメインでパスワードとして使用されますが、wwwおよびlocalでは使用されません。Apache 2.4サブドメインのパスワードが正しく機能していないと思われる
私はhttps://httpd.apache.org/docs/trunk/howto/auth.htmlガイドに従った。そのアドレスから来るビジターは、このディレクティブの対象となるコンテンツを見ることができません。その代わりに、IPアドレスではなくマシン名があれば、それを使うことができます。
AuthType Basic
AuthName "Password Required"
<If "req('Host') == 'dev.domain.ee'">
AuthUserFile /path/dev/.htpasswd
</If>
<If "req('Host') == 'test.domain.ee'">
AuthUserFile /path/test/.htpasswd
</If>
<If "req('Host') == 'prelive.domain.ee'">
AuthUserFile /path/prelive/.htpasswd
</If>
<RequireAll>
Require all granted
Require not host dev.domain.ee test.domain.ee prelive.domain.ee
</RequireAll>
はまだそれは私が自分自身の問題の解決策を見つけたdev.domain.ee