繁体   English   中英

无法访问tomcat管理器GUI(Tomcat9 + Java9)

[英]Unable to access tomcat manager GUI (Tomcat9+Java9)

我正在使用9.0.1版的tomcat。 使用Java 9在Linux机器上运行。

在我的tomcat-users.xml中,我在下面添加了

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

在谷歌搜索后在我的server.xml中添加以下行

<Realm className="org.apache.catalina.realm.MemoryRealm" />

之后,我通过tomcat服务器启动,同时访问maneger gui低于错误

403 Access Denied

You are not authorized to view this page.
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.

请帮忙

tomcat-users.xml

<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-gui"/>
<role rolename="manager"/>
<role rolename="manager-script"/>
<user username="admin" password="admin" roles="manager-gui,manager,manager-script"/>
</tomcat-users>

我认为403 ERROR的解决方案是将您的IP/IPs添加到文件中

webapps/manager/META-INF/context.xml

在该部分中:

<Valve className="org.apache.catalina.valves.RemoteAddrValve"  allow="X.X.X.X"/>

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM