Apache Tomcat/8.5.3 Manager App 403错误 [英] Apache Tomcat/8.5.3 Manager App 403 error

查看:160
本文介绍了Apache Tomcat/8.5.3 Manager App 403错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的tomcat在aws的ubuntu实例上运行,我可以成功进入If you're seeing this, you've successfully installed Tomcat. Congratulations!页面,但是当我单击Manager App时,我立即导航到403 Access Denied页面.

I have tomcat running on an ubuntu instance on aws and I can successfully get to the If you're seeing this, you've successfully installed Tomcat. Congratulations! page but when I click on Manager App I immediately get navigated to the 403 Access Denied page.

我已经将tomcat-users.xml文件编辑为具有manager-gui角色,甚至使用户也具有manager-status,manager-script.

I've edited the tomcat-users.xml file to have a manager-gui role and even made the user have manager-status, manager-script, as well.

然后,我使用bin/shutdown.sh关闭服务器,导航到该页面以检查服务器是否确实关闭,然后执行bin/startup.sh重新启动它.

Then I shut down the server using bin/shutdown.sh, navigated to the page to check that it was actually shut down then did bin/startup.sh to restart it.

但是,每当我单击该Manager App按钮时,它甚至都不会弹出用户名/密码框,而直接进入403页.

But whenever I click on that Manager App button it doesn't even bring up the username/password box it just goes straight to the 403 page.

我还想念其他东西吗?

Am I missing something else?

这是我整个用户的xml文件

Here is my entire users xml file

<?xml version='1.0' encoding='utf-8'?>

<tomcat-users 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"
              version="1.0">

  <role rolename="manager-script"/>
  <role rolename="manager-gui"/>
  <role rolename="manager-jmx"/>
  <role rolename="manager-status"/>
  <user username="admin" password="myPassword" roles="manager-gui,manager-status,manager-script"/>

</tomcat-users>

推荐答案

这有助于我使其正常运行. Tomcat管理器从不询问我ID/密码

This helped me to get it working. Tomcat manager never asking me ID/PASSWORD

您需要将manager.xml添加到conf/Catalina/localhost

You need to add the manager.xml to conf/Catalina/localhost

根据文档:

默认的Tomcat安装包括Manager.要将Manager Web应用程序上下文的实例添加到新主机,请在$ CATALINA_BASE/conf/[enginename]/[hostname]文件夹中安装manager.xml上下文配置文件"

"A default Tomcat installation includes the Manager. To add an instance of the Manager web application Context to a new host install the manager.xml context configuration file in the $CATALINA_BASE/conf/[enginename]/[hostname] folder"

例如,在我的情况下,我具有以下路径:/opt/tomcat/conf/Catalina/localhost

In my case for example, I have this path: /opt/tomcat/conf/Catalina/localhost

manager.xml的示例

Example of manager.xml

<Context privileged="true" antiResourceLocking="false" docBase="${catalina.home}/webapps/manager">
<Valve className="org.apache.catalina.valves.RemoteAddrValve" allow="^.*$" /></Context>

这篇关于Apache Tomcat/8.5.3 Manager App 403错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆