Tomcat虚拟主机配置Manager是tomcat-users.xml怎么配?
来源:百度知道 编辑:UC知道 时间:2024/06/30 07:20:42
或者说哪位高手有更好的Tomcat虚拟主机配置方案?
本人正在尝试多Tomcat实例的方案,正在调试中,希望有高人可以给以指点,不胜感激!
在你的hostA里manager的web.xml
<!-- Define a Security Constraint on this Application -->
<security-constraint>
<web-resource-collection>
<web-resource-name>Entire Application</web-resource-name>
<url-pattern>/manager/*</url-pattern>
</web-resource-collection>
<auth-constraint>
<role-name>your-role</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
</des