码迷,mamicode.com
首页 > 其他好文 > 详细

tomcat 配置记录

时间:2015-03-13 16:41:34      阅读:135      评论:0      收藏:0      [点我收藏+]

标签:tomcat   配置   manager   admin   

以前我都是这样配置manager和admin的:

<?xml version="1.0" encoding="UTF-8"?>

<tomcat-users version="1.0" xmlns="http://tomcat.apache.org/xml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://tomcat.apache.org/xml tomcat-users.xsd">

<role rolename="manager-gui"/>
<role rolename="admin-gui"/>
<user password="123456" roles="manager-gui“ username="tomcat"/>
<user password="123456" roles="admin-gui" username="tomcat"/>

</tomcat-users>

今天下了tomcat8.0.17进行配置,竟然发现这样子不行了,要么manager可以admin不行,要么admin行manager不行,折腾了一会儿,看了官方文档,发现要这样配置了:

<?xml version="1.0" encoding="UTF-8"?>

<tomcat-users version="1.0" xmlns="http://tomcat.apache.org/xml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://tomcat.apache.org/xml tomcat-users.xsd">

<role rolename="manager-gui"/>
<role rolename="admin-gui"/>
<user password="123456" roles="manager-gui,admin-gui“ username="tomcat"/>

</tomcat-users>

这样配置,manager和admin才同时生效。

tomcat 配置记录

标签:tomcat   配置   manager   admin   

原文地址:http://blog.csdn.net/caiwenfeng_for_23/article/details/44241259

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!