2

Tomcat 7.0.65 を使用しています。

ここに私の tomcat-users.xml があります:

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

server.xml のサーバー レルム スニペットは次のとおりです。

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

以下の URL にアクセスできます: [初めて認証情報を要求されます]

http://localhost:8080/manager/status http://localhost:8080/manager/status/all

ただし、いずれかの URL にアクセスする場合:

http://localhost:8080/manager/text/sessions?path=/examples http://localhost:8080/manager/text/serverinfo

「404 Not found」で失敗します。以下は、表示されるエラー メッセージです。

The page you tried to access (/manager/text/sessions) does not exist.

The Manager application has been re-structured for Tomcat 7 onwards and some of URLs have changed. All URLs used to access the Manager application should now start with one of the following options:

/manager/html for the HTML GUI
/manager/text for the text interface
/manager/jmxproxy for the JMX proxy
/manager/status for the status pages
Note that the URL for the text interface has changed from "/manager" to "/manager/text".

You probably need to adjust the URL you are using to access the Manager application. However, there is always a chance you have found a bug in the Manager application. If you are sure you have found a bug, and that the bug has not already been reported, please report it to the Apache Tomcat team.

/manager/text として URL にアクセスしていることに注意してください。curl でも同じエラーで失敗します。

構成が不足していますか?

4

2 に答える 2

0

conf/tomcat-users.xml ファイルで以下のロールを提供します。

<user username="test" password="test" roles="admin-gui,manager-gui"/>
于 2020-12-26T06:55:27.293 に答える