管理tomcat的时候遇到了以下问题:

  1.刚开始需要用户名密码,不知道用户名和密码是什么,但是输入什么都不正确。

  解决办法:

  自己在tomcat-users.xml中按格式添加用户 conf文件夹里面

  默认是注释掉了的,这主要是考虑到服务器的安全,如果是本地测试,去掉以下这段注释,然后重启动服务器,再输入

   <role rolename="tomcat"/>

    <role rolename="role1"/>

    <user username="tomcat" password="tomcat" roles="tomcat"/>

    <user username="both" password="tomcat" roles="tomcat,role1"/>

    <user username="role1" password="tomcat" roles="role1"/>

  用户和密码都一目了然了。

2.进入manager界面之后,显示的是403 Access Denied。

  解决办法:

  在conf/tomcat-users.xml文件中看到这么一段话:

  NOTE:  By default, no user is included in the "manager-gui" role required

    to operate the "/manager/html" web application.  If you wish to use this app,

    you must define such a user - the username and password are arbitrary.

  也就是说,为了考虑安全,tomcat默认还是没有manager-gui的管理权限的,如果想要使用manager

  的话,需要自行加入管理权限(角色)。

  需要加一个这样的权限(角色)

  <role rolename="manager-gui"/>

  然后再加到需要的用户名中去

  <user username="tomcat" password="tomcat" roles="tomcat,manager-gui"/>

  这样OK了。

<?xml version='1.0' encoding='utf-8'?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<tomcat-users>
<!--
NOTE: By default, no user is included in the "manager-gui" role required
to operate the "/manager/html" web application. If you wish to use this app,
you must define such a user - the username and password are arbitrary.
-->
<!--
NOTE: The sample user and role entries below are wrapped in a comment
and thus are ignored when reading this file. Do not forget to remove
<!.. ..> that surrounds them.
--> <!--
<role rolename="tomcat"/>
<role rolename="role1"/>
<user username="tomcat" password="tomcat" roles="tomcat"/>
<user username="both" password="tomcat" roles="tomcat,role1"/>
<user username="role1" password="tomcat" roles="role1"/>
-->
<role rolename="manager-gui"/>
<role rolename="admin-gui"/>
<user username="ming" password="064417" roles="manager-gui,admin-gui"/> </tomcat-users>

Tomcat的Manager显示403 Access Denied的更多相关文章

  1. Tomcat 9.0 配置问题 403 Access Denied

    tomcat9.0 管理页面如:http://10.10.10.10:8080/manager/html出现如下错误: 403 Access Denied 1.需要配置: Tomcat/conf/to ...

  2. 登录时显示403 Access Denied

    用户名及密码设置如下: 在tomcat安装目录\conf\tomcat-users.xml中的<tomcat-users>标签内设置: <role rolename="ma ...

  3. JavaWeb——tomcat manager 403 Access Denied .You are not authorized to view this page.

    403 Access Denied You are not authorized to view this page. If you have already configured the Manag ...

  4. tomcat管理页面403 Access Denied的解决方法

    安装tomcat,配置好tomcat环境变量以后,访问manager app页面,出现403 Access Denied错误,解决的方法如下: 首先在conf/tomcat-users.xml文件里面 ...

  5. Tomcat8访问管理页面localhost出现:403 Access Denied

    问题: Access Denied You are not authorized to view this page. If you have already configured the Manag ...

  6. tomcat8 管理页面403 Access Denied的解决方法

      安装tomcat,配置好tomcat环境变量以后,访问manager app页面,出现403 Access Denied错误,解决的方法如下: 首先在conf/tomcat-users.xml文件 ...

  7. tomcat访问管理页面出现:403 Access Denied 解决方法

    点击红色框框出现以下403错误 打开context.xml文件 vim /usr/local/tomcat/webapps/manager/META-INF/context.xml <Conte ...

  8. Tomcat7以上403 Access Denied错误

    版本:Tomcat 9 问题:新安装的tomcat,访问tomcat的Server Status.Manager App.Host Manager三个页面均显示403,conf/tomcat-user ...

  9. 403 Access Denied :进入Tomcat的manager时拒绝访问

    解决办法: https://blog.csdn.net/Hello_World_QWP/article/details/79581174

随机推荐

  1. leetcode NO.1 两数之和 (python实现)

    来源 https://leetcode-cn.com/problems/two-sum/description/ 题目描述 给定一个整数数组和一个目标值,找出数组中和为目标值的两个数. 你可以假设每个 ...

  2. Summary—【base】(JavaScript)

    1.认识Js     1.1 Js就是一门运行在客户端浏览器的脚本编程语言     1.2 组成            ECMAScript:Js的语法标准            DOM:JS操作网页 ...

  3. JDBC 学习笔记(九)—— ResultSetMetaData

    ResultSet 提供了一个 getMetaData() 方法,用来获取 ResultSet 对应的 ResultSetMetaData 对象: ResultSetMetaData getMetaD ...

  4. 一些filter

    Vue.filter('money', (value, symbol = '', currency = '¥', decimals = 0) => { const digitsRE = /(\d ...

  5. 【神题】AtCoder 028 C Min Cost Cycle

    TO BE DONE 思维题 十分巧妙的转化

  6. service中显示一个dialog

    dialog是依附于activity存在的.但是app中经常需要使用以下的情况,在service中做一些后台操作,在某个临界条件满足时,显示一个dialog告知用户.这时dialog无法直接从serv ...

  7. matplotlib pyplot 中文显示问题

    import pylab pylab.mpl.rcParams['font.sans-serif'] = ['SimHei'] pylab.mpl.rcParams['axes.unicode_min ...

  8. JavaScript中in的用法

    JavaScript中的in 操作符是对Object(对象)操作的,并不是针对数组. in 的右边必须是对象变量 例如:var data = {id:1, name:'AAA'};if('name' ...

  9. Python操作MySQL[转]

    本篇对于Python操作MySQL主要使用两种方式: 1.原生模块pymsql. 2.ORM框架SQLAchemy. pymsql pymsql是Python中操作MySQL的模块,其使用方法和MyS ...

  10. Select语句执行顺序《转》

    原文发布时间为:2010-10-12 -- 来源于本人的百度文章 [由搬家工具导入] 目的在于理解如何Select 【搜索所得】: 标准的 SQL 的解析顺序为:(1).FROM 子句, 组装来自不同 ...