2016-10-11 3 views
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

答えて

0

にパスワードを要求しないことによって動作しません。

はlocalhostとwww.domain.ee

を除く他のすべての場合に有効なユーザーを必要とするテレス
<RequireAny> 
    Require host www.domain.ee 
    Require local 
    Require valid-user 
</RequireAny> 

関連する問題