Tomcat8在的用户安全配置
[*]Tomcat的角色
[*]manager-gui — Access to the HTML interface.
[*]manager-status — Access to the "Server Status" page only.
[*]manager-script — Access to the tools-friendly plain text interface that is described in this document, and to the "Server Status" page.
[*]manager-jmx — Access to JMX proxy interface and to the "Server Status" page.
2. 使用明文密码配置用户和密码
Tomcat默认安装时是没有配置用户和密码,在访问tomcat管理控制台时需要先配置相关的用户角色,用户和密码,在如下配置文件中增加相关:
$CATALINA_HOME/conf/tomcat-users.xml如创建一个tomcat用户,密码为tomcat,角色为manager-gui,
<role rolename="manager-gui"/><user username="tomcat" password="tomcat" roles="manager-gui"/>文件保存后重新启动tomcat,配置的用户就可以生效了 这时候就可以使用配置好的tomcat用户登录tomcat管理控制台页面了
http://192.168.56.2:8080/
3.只有指定IP段的客户端才可以访问tomcat服务,需要在server.xml中配置粗体部分的配置项
<Host appBase="webapps" autoDeploy="true" name="localhost" unpackWARs="true">
<Valve className="org.apache.catalina.valves.RemoteAddrValve" allow="192.168.1.*" eny=""/>
</Host>
3.密码如何以密文保存在配置文件中?
TODO
页:
[1]