Tomcat7サーバーのデフォルトページをプライベートにしたい、つまり.htaccess
パスワードを入力した後でのみアクセスできるようにしたい。
私はこのページを意味します:
その目的のために、私は追加しました:
<user username="admin" password="admin" roles="manager-gui"/>
にtomcat-users.xml
。
それから私は追加しました:
<security-constraint>
<web-resource-collection>
<web-resource-name>Entire Application</web-resource-name>
<url-pattern>/references/*</url-pattern>
</web-resource-collection>
<auth-constraint>
<role-name>admin</role-name>
</auth-constraint>
</security-constraint>
<!-- Define the Login Configuration for this Application -->
<login-config>
<auth-method>BASIC</auth-method>
<realm-name>Application</realm-name>
</login-config>
<!-- Security roles referenced by this web application -->
<security-role>
<description>
The role that is required to log in to the Manager Application
</description>
<role-name>admin</role-name>
</security-role>
にwebapps/ROOT/WEB-INF/web.xml
。
しかし、デフォルトのページを開いても、htaccessダイアログボックスが表示されません。
私は何が間違っているのですか?