虚拟主机方案建站怎么选择虚拟主机?


Tomcat虚拟主机配置Manager是tomcat-users.xml怎么配?

在你的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
</description>
<role-name>your-role</role-name>
</security-role>


把your-role替换成你的tomcat-users.xml定义的用户就行了...

建站怎么选择虚拟主机?

国内站建议选择香港虚拟主机,外贸站建议选择美国主机,例如虚拟主机HostEase,方案多,可满足各类型网站需求,作为参考,谢谢!