进入tomcat,点击管理模块(Manager App)或者查看服务器状态(Server Status),提示401 Unauthorized
![](https://i-blog.csdnimg.cn/blog_migrate/52ff389719e41da8523319dda98700a4.png)
提示如下页面
![](https://i-blog.csdnimg.cn/blog_migrate/92f226942e1ec88f40225d19e23b3e23.png)
原因是tomat默认没有配置角色和用户,按照提示页面进行配置即可
打开tomcat安装目录,进入到conf\tomact_user.xml
<tomcat-users>
<role rolename="manager-gui"/>
<role rolename="manager-script"/>
<user username="tomcat" password="tomcat" roles="manager-gui"/>
<user username="admin" password="123456&