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

问题:


403 Access Denied

You are not authorized to view this page.

If you have already configured the Manager application to allow access and you have used your browsers back button, used a saved book-mark or similar then you may have triggered the cross-site request forgery (CSRF) protection that has been enabled for the HTML interface of the Manager application. You will need to reset this protection by returning to the main Manager page. Once you return to this page, you will be able to continue using the Manager appliction‘s HTML interface normally. If you continue to see this access denied message, check that you have the necessary permissions to access this application.

If you have not changed any configuration files, please examine the file conf/tomcat-users.xml in your installation. That file must contain the credentials to let you use this webapp.

For example, to add the manager-gui role to a user named tomcat with a password of s3cret, add the following to the config file listed above.

<role rolename="manager-gui"/>
<user username="tomcat" password="s3cret" roles="manager-gui"/>
Note that for Tomcat 7 onwards, the roles required to use the manager application were changed from the single manager role to the following four roles. You will need to assign the role(s) required for the functionality you wish to access.

manager-gui - allows access to the HTML GUI and the status pages
manager-script - allows access to the text interface and the status pages
manager-jmx - allows access to the JMX proxy and the status pages
manager-status - allows access to the status pages only
The HTML interface is protected against CSRF but the text and JMX interfaces are not. To maintain the CSRF protection:

Users with the manager-gui role should not be granted either the manager-script or manager-jmx roles.
If the text or jmx interfaces are accessed through a browser (e.g. for testing since these interfaces are intended for tools not humans) then the browser must be closed afterwards to terminate the session.

tomcat-users.xml配置内容为:


<!--
<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"/>
-->
<user username="admin" password="admin" roles="manager"/>

</tomcat-users>

解决方案:

<user username="admin" password="admin" roles="manager"/>改为:

<user username="admin" password="admin" roles="manager-gui"/>即可。

原因是tomcat8中role已经manager换为manager-gui了。

时间: 2024-10-07 19:36:00

Tomcat8访问管理页面localhost出现:403 Access Denied的相关文章

mysqladmin: connect to server at &#39;localhost&#39; failed error: &#39;Access denied for user &#39;root&#39;@&#39;localhost&#39; (using password: YES)&#39;

就当作自己忘记Mysql密码把,忘记密码的解决方法 一.mysql登录错误mysqladmin: connect to server at 'localhost' failederror: 'Access denied for user 'root'@'localhost' (using password: YES)'无法修改密码用 service mysqld stopmysqld_safe --skip-grant-tables &输入 mysql -uroot -p 回车进入>use

tomcat8 进入不了Manager App 界面 403 Access Denied

准备 1.注释掉context.xml中的value属性 使用下面的命令: vim /usr/local/tomcats/tomcat-daily/webapps/manager/META-INF/context.xml 注释掉其中value节点 2.修改tomcat-users.xml文件 加入下面的配置 <role rolename="manager-gui" /> <role rolename="manager-script" /> &

tomcat8以上管理页面提示403问题

修改conf/tomcat-users.xml <role rolename="manager"/> <role rolename="manager-gui"/> <role rolename="admin"/> <user username="user" password="password" roles="admin,manager,manager-g

远程访问Tomcat 403 Access Denied

具体报错请看截图.请先确定是否配置Tomcat用户名和密码,如果没有那么请移步CentOS安装Tomcat去配置Tomcat的用户信息并重新启动,如果还有403,请你接着往下看. 首先打开tomcat目录下的webapps/manager/META-INF/context.xml vim webapps/manager/META-INF/context.xml 将下面这一段注释 接下来直接刷新,输入账号密码即可. 原文地址:https://www.cnblogs.com/lbrs/p/12116

tomcat 403 Access Denied

vim Tomcat/webapps/manager/META-INF/context.xml 注释Value节点   <!-- <Valve className="org.apache.catalina.valves.RemoteAddrValve"    allow="127\.\d+\.\d+\.\d+|::1|0:0:0:0:0:0:0:1|\d+\.\d+\.\d+\.\d+" /> -->

登录时显示403 Access Denied

用户名及密码设置如下: 在tomcat安装目录\conf\tomcat-users.xml中的<tomcat-users>标签内设置: <role rolename="manager"/> <user username="me" password="isme" roles="manager"/> 请问为什么会被拒绝 在tomcat安装目录下找到conf中的tomcat-users.xml文件

解决mysql“Access denied for user &#39;root&#39;@&#39;localhost&#39;”

解决mysql“Access denied for user 'root'@'localhost'” 分类: linux 2011-01-14 00:23 147547人阅读 评论(3) 收藏 举报 mysqluseraccessmanager数据库system # mysql -uroot -pEnter password:ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO) 使用网

XAMPP项目目录自定义后403 Access Forbidden

XAMPP安装过程不细述了,先来简单回顾一下XAMPP配置: \xampp\apache\conf\extra\httpd-vhosts.conf <VirtualHost *:80> ServerAdmin [email protected]domain.td DocumentRoot "盘符:/路径/项目目录" ServerName domain.td # domain.td 为自定义服务器名,只要你喜欢...随意 ServerAlias www.domain.td #

windows: Access denied for user &#39;root&#39;@&#39;localhost&#39; .....(转自新浪:http://blog.sina.com.cn/s/blog_40aff6390100jeke.html)

WINDOWS-XP 系统 mysql-5.1.22-noinstall-win32 提示:access denied for user 'root'@'localhost' using password yes 前几天都好好的,今天开机上来提示上面的这个错误,重启 MySQL 还是不可以. 在网上搜索了好久,总算找到详细的操作方法了.为了以后不再浪费时间,把她重新整理放到 Blog 里. 注意我这里的环境是 WINDOWS-XP 系统,LINUX 系统下的操作没有验证过,情况不清楚. 1. 管