2015-06-09 93 views
21

Tomcat管理器無法在我的多域配置中訪問。即使管理員文件存在於兩個域中,我也會得到404。Tomcat管理器無法在多域配置中訪問

夠搞笑的是,我可以使這個配置在本地工作。但是,當我將配置傳輸到我的服務器時,它會崩潰。

這裏是我的配置文件:用於內部網和互聯網中的webapps

<?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. 
--> 
<!-- Note: A "Server" is not itself a "Container", so you may not 
    define subcomponents such as "Valves" at this level. 
    Documentation at /docs/config/server.html 
--> 
<Server port="8005" shutdown="SHUTDOWN"> 
    <Listener className="org.apache.catalina.startup.VersionLoggerListener" /> 
    <!-- Security listener. Documentation at /docs/config/listeners.html 
    <Listener className="org.apache.catalina.security.SecurityListener" /> 
    --> 
    <!--APR library loader. Documentation at /docs/apr.html --> 
    <Listener className="org.apache.catalina.core.AprLifecycleListener" SSLEngine="on" /> 
    <!-- Prevent memory leaks due to use of particular java/javax APIs--> 
    <Listener className="org.apache.catalina.core.JreMemoryLeakPreventionListener" /> 
    <Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" /> 
    <Listener className="org.apache.catalina.core.ThreadLocalLeakPreventionListener" /> 

    <!-- Global JNDI resources 
     Documentation at /docs/jndi-resources-howto.html 
    --> 
    <GlobalNamingResources> 
    <!-- Editable user database that can also be used by 
     UserDatabaseRealm to authenticate users 
    --> 
    <Resource name="UserDatabase" auth="Container" 
       type="org.apache.catalina.UserDatabase" 
       description="User database that can be updated and saved" 
       factory="org.apache.catalina.users.MemoryUserDatabaseFactory" 
       pathname="conf/tomcat-users.xml" /> 
    </GlobalNamingResources> 

    <!-- A "Service" is a collection of one or more "Connectors" that share 
     a single "Container" Note: A "Service" is not itself a "Container", 
     so you may not define subcomponents such as "Valves" at this level. 
     Documentation at /docs/config/service.html 
    --> 
    <Service name="Catalina"> 

    <!--The connectors can use a shared executor, you can define one or more named thread pools--> 
    <!-- 
    <Executor name="tomcatThreadPool" namePrefix="catalina-exec-" 
     maxThreads="150" minSpareThreads="4"/> 
    --> 


    <!-- A "Connector" represents an endpoint by which requests are received 
     and responses are returned. Documentation at : 
     Java HTTP Connector: /docs/config/http.html (blocking & non-blocking) 
     Java AJP Connector: /docs/config/ajp.html 
     APR (HTTP/AJP) Connector: /docs/apr.html 
     Define a non-SSL/TLS HTTP/1.1 Connector on port 8080 
    --> 
    <Connector port="8080" protocol="HTTP/1.1" 
       connectionTimeout="20000" 
       redirectPort="8443" /> 
    <!-- A "Connector" using the shared thread pool--> 
    <!-- 
    <Connector executor="tomcatThreadPool" 
       port="8080" protocol="HTTP/1.1" 
       connectionTimeout="20000" 
       redirectPort="8443" /> 
    --> 
    <!-- Define a SSL/TLS HTTP/1.1 Connector on port 8443 
     This connector uses the NIO implementation that requires the JSSE 
     style configuration. When using the APR/native implementation, the 
     OpenSSL style configuration is required as described in the APR/native 
     documentation --> 
    <!-- 
    <Connector port="8443" protocol="org.apache.coyote.http11.Http11NioProtocol" 
       maxThreads="150" SSLEnabled="true" scheme="https" secure="true" 
       clientAuth="false" sslProtocol="TLS" /> 
    --> 

    <!-- Define an AJP 1.3 Connector on port 8009 --> 
    <Connector port="8009" protocol="AJP/1.3" redirectPort="8443" /> 


    <!-- An Engine represents the entry point (within Catalina) that processes 
     every request. The Engine implementation for Tomcat stand alone 
     analyzes the HTTP headers included with the request, and passes them 
     on to the appropriate Host (virtual host). 
     Documentation at /docs/config/engine.html --> 

    <!-- You should set jvmRoute to support load-balancing via AJP ie : 
    <Engine name="Catalina" defaultHost="localhost" jvmRoute="jvm1"> 
    --> 
    <Engine name="Catalina" defaultHost="localhost"> 

     <!--For clustering, please take a look at documentation at: 
      /docs/cluster-howto.html (simple how to) 
      /docs/config/cluster.html (reference documentation) --> 
     <!-- 
     <Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster"/> 
     --> 

     <!-- Use the LockOutRealm to prevent attempts to guess user passwords 
      via a brute-force attack --> 
     <Realm className="org.apache.catalina.realm.LockOutRealm"> 
     <!-- This Realm uses the UserDatabase configured in the global JNDI 
      resources under the key "UserDatabase". Any edits 
      that are performed against this UserDatabase are immediately 
      available for use by the Realm. --> 
     <Realm className="org.apache.catalina.realm.UserDatabaseRealm" 
       resourceName="UserDatabase"/> 
     </Realm> 

     <Host name="my.intranet.com" appBase="webapps/intranet" 
      unpackWARs="true" autoDeploy="true"> 

      <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs" 
        prefix="intra_localhost_access_log" suffix=".txt" 
        pattern="%h %l %u %t &quot;%r&quot; %s %b" /> 
     </Host> 

     <Host name="my.internet.com" appBase="webapps/internet" 
      unpackWARs="true" autoDeploy="true"> 

      <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs" 
        prefix="inter_localhost_access_log" suffix=".txt" 
      pattern="%h %l %u %t &quot;%r&quot; %s %b" /> 
     </Host> 
    </Engine> 
    </Service> 
</Server> 

目錄列表,顯示這兩個文件夾已被複制的經理:

[[email protected] internet]$ ls -l 
drwxr-xr-x 2 tomcat appsadmins 4096 Jun 9 08:34 hello 
drwxr-xr-x 5 tomcat appsadmins 4096 Jun 9 08:25 manager 

[[email protected] intranet]$ ls -l 
drwxr-xr-x 2 tomcat appsadmins  4096 Jun 9 08:34 hello 
drwxr-xr-x 5 tomcat appsadmins  4096 Jun 9 08:25 manager 

/hello背景下都工作顯示每個域的個性化內容。

我還可以手動將WAR文件移動到每個Intranet和Internet文件夾中進行部署。然而,有人問我使用Tomcat管理器(這是取消部署/部署標準的方式?)

編輯#1

這是目前在Tomcat 8/Java的8。但是,我有在我們的其他Tomcat7/Java7服務器上獲得了相同的結果。本地虛擬機雖然沒有問題。

編輯#2

日誌文件似乎表明,該管理器已成功部署。

22-Jun-2015 09:33:24.813 INFO [my.internet.com-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory /path/to/tomcat/webapps/internet/manager has finished in 562 ms 
22-Jun-2015 09:33:51.990 INFO [my.intranet.com-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory /path/to/tomcat/webapps/intranet/manager has finished in 316 ms 

編輯#3

我加webapps/host-manager/manager.xmlconf/Catalina/my.internet.com/conf/Catalina/my.intranet.com

我仍然獲得了404

編輯#4

恢復爲最小配置。 404上的經理/ HTML仍然。

  • 清除tomcat8/conf目錄/卡塔利娜
  • 清除tomcat8 /工作
  • 重啓

唯一配置的主機:

<Host name="localhost" appBase="webapps" 
      unpackWARs="true" autoDeploy="true"> 

訪問日誌:

xxx.xxx.xxx.xxx - - [02/Jul/2015:10:17:41 -0400] "GET /manager/html HTTP/1.1" 404 1018 

/docs/example雖然工作。

而且,在CentOS 6.3虛擬機中,我能夠模擬兩個域名,而不用大驚小怪。

編輯#5

需要回到這個......我的目標服務器上一次。

回顧,互聯網領域的配置:

<Host name="my.internet.com" appBase="inter" 
    unpackWARs="true" autoDeploy="true"> 

    <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs" 
      prefix="inter_localhost_access_log" suffix=".txt" 
    pattern="%h %l %u %t &quot;%r&quot; %s %b" /> 
</Host> 

做一個tail -f logs/inter_localhost_access_log.2015-08-04.txt,我可以看到連接到my.internet.com時被記錄的請求。

訪問manager/html,給了我404

my_ip - - [04/Aug/2015:08:59:28 -0400] "GET /manager/html HTTP/1.1" 404 1028 
my_ip - - [04/Aug/2015:08:59:28 -0400] "GET /favicon.ico HTTP/1.1" 200 21630 
my_ip - - [04/Aug/2015:08:59:28 -0400] "GET /favicon.ico HTTP/1.1" 200 21630 

訪問的inter

[[email protected] inter]$ ls -la 
total 28 
drwxrwsr-x 7 tomcat appsadmins 4096 Jun 30 08:15 . 
drwxrwsr-x 11 tomcat appsadmins 4096 Jul 10 14:50 .. 
drwxrwsr-x 14 tomcat appsadmins 4096 Jun 30 08:14 docs 
drwxrwsr-x 6 tomcat appsadmins 4096 Jun 30 08:14 examples 
drwxrwsr-x 5 tomcat appsadmins 4096 Jun 30 08:14 host-manager 
drwxrwsr-x 5 tomcat appsadmins 4096 Jun 30 08:14 manager 
drwxrwsr-x 3 tomcat appsadmins 4096 Jun 30 08:15 ROOT 

進程信息

my_ip - - [04/Aug/2015:08:59:57 -0400] "GET /docs HTTP/1.1" 302 - 
my_ip - - [04/Aug/2015:08:59:57 -0400] "GET /docs/ HTTP/1.1" 200 16805 
my_ip - - [04/Aug/2015:08:59:57 -0400] "GET /docs/images/docs-stylesheet.css HTTP/1.1" 200 6082 
my_ip - - [04/Aug/2015:08:59:57 -0400] "GET /docs/images/tomcat.png HTTP/1.1" 200 8410 
my_ip - - [04/Aug/2015:08:59:57 -0400] "GET /docs/images/fonts/fonts.css HTTP/1.1" 200 1996 
my_ip - - [04/Aug/2015:08:59:57 -0400] "GET /docs/images/asf-feather.png HTTP/1.1" 200 40042 
my_ip - - [04/Aug/2015:08:59:57 -0400] "GET /docs/images/fonts/OpenSans600.woff HTTP/1.1" 200 22604 
my_ip - - [04/Aug/2015:08:59:57 -0400] "GET /docs/images/fonts/OpenSans400.woff HTTP/1.1" 200 21956 
my_ip - - [04/Aug/2015:08:59:57 -0400] "GET /docs/images/fonts/OpenSans700.woff HTTP/1.1" 200 22748 
my_ip - - [04/Aug/2015:08:59:57 -0400] "GET /docs/images/fonts/OpenSans400italic.woff HTTP/1.1" 200 21092 
my_ip - - [04/Aug/2015:08:59:57 -0400] "GET /favicon.ico HTTP/1.1" 200 21630 
my_ip - - [04/Aug/2015:08:59:57 -0400] "GET /favicon.ico HTTP/1.1" 200 21630 

文件列表0

[[email protected] inter]$ ps aux | grep tomcat 
tomcat 31863 3.7 4.1 2914836 162184 pts/0 Sl 08:56 0:18 /usr/bin/java -Djava.util.logging.config.file=/path/to/tomcat8/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.endorsed.dirs=/path/to/tomcat8/endorsed -classpath /path/to/tomcat8/bin/bootstrap.jar:/path/to/tomcat8/bin/tomcat-juli.jar -Dcatalina.base=/path/to/tomcat8 -Dcatalina.home=/path/to/tomcat8 -Djava.io.tmpdir=/path/to/tomcat8/temp org.apache.catalina.startup.Bootstrap start 

HTTP標頭在Firefox:

http://my.internet.com:8080/manager/index.jsp 

GET /manager/index.jsp HTTP/1.1 
Host: my.internet.com:8080 
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:39.0) Gecko/20100101 Firefox/39.0 
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 
Accept-Language: en-US,en;q=0.5 
Accept-Encoding: gzip, deflate 
Cookie: JSESSIONID=92691406245E9FA2F35105951A8363F8; __utma=200567291.1579910409.1418663486.1431011588.1437739620.4; __utmz=200567291.1418663486.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); _ga=GA1.3.1579910409.1418663486; _dfo_lang=en 
Connection: keep-alive 

HTTP/1.1 302 Found 
Server: Apache-Coyote/1.1 
Location: http://my.internet.com:8080/manager/html 
Content-Type: text/html;charset=ISO-8859-1 
Content-Length: 0 
Date: Tue, 04 Aug 2015 13:13:36 GMT 
---------------------------------------------------------- 
http://my.internet.com:8080/manager/html 

GET /manager/html HTTP/1.1 
Host: my.internet.com:8080 
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:39.0) Gecko/20100101 Firefox/39.0 
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 
Accept-Language: en-US,en;q=0.5 
Accept-Encoding: gzip, deflate 
Cookie: JSESSIONID=92691406245E9FA2F35105951A8363F8; __utma=200567291.1579910409.1418663486.1431011588.1437739620.4; __utmz=200567291.1418663486.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); _ga=GA1.3.1579910409.1418663486; 
Connection: keep-alive 

HTTP/1.1 404 Not Found 
Server: Apache-Coyote/1.1 
Content-Type: text/html;charset=utf-8 
Content-Language: en 
Content-Length: 1018 
Date: Tue, 04 Aug 2015 13:13:36 GMT 

編輯#6

權限上/docs/manager

[[email protected] docs]$ ls -l 
total 1296 
-rw-rwSr-- 1 tomcat appsadmins 21715 Jun 30 08:14 aio.html 
drwxrwsr-x 2 tomcat appsadmins 4096 Jun 30 08:14 api 
drwxrwsr-x 3 tomcat appsadmins 4096 Jun 30 08:14 appdev 
-rw-rwSr-- 1 tomcat appsadmins 13843 Jun 30 08:14 apr.html 
drwxrwsr-x 4 tomcat appsadmins 4096 Jun 30 08:14 architecture 
-rw-rwSr-- 1 tomcat appsadmins 7701 Jun 30 08:14 balancer-howto.html 
-rw-rwSr-- 1 tomcat appsadmins 16305 Jun 30 08:14 building.html 
-rw-rwSr-- 1 tomcat appsadmins 16480 Jun 30 08:14 BUILDING.txt 
-rw-rwSr-- 1 tomcat appsadmins 10726 Jun 30 08:14 cgi-howto.html 
-rw-rwSr-- 1 tomcat appsadmins 209429 Jun 30 08:14 changelog.html 
-rw-rwSr-- 1 tomcat appsadmins 18330 Jun 30 08:14 class-loader-howto.html 
-rw-rwSr-- 1 tomcat appsadmins 43860 Jun 30 08:14 cluster-howto.html 
-rw-rwSr-- 1 tomcat appsadmins 10301 Jun 30 08:14 comments.html 
drwxrwsr-x 2 tomcat appsadmins 4096 Jun 30 08:14 config 
-rw-rwSr-- 1 tomcat appsadmins 8806 Jun 30 08:14 connectors.html 
-rw-rwSr-- 1 tomcat appsadmins 17936 Jun 30 08:14 default-servlet.html 
-rw-rwSr-- 1 tomcat appsadmins 23038 Jun 30 08:14 deployer-howto.html 
-rw-rwSr-- 1 tomcat appsadmins 8733 Jun 30 08:14 developers.html 
drwxrwsr-x 2 tomcat appsadmins 4096 Jun 30 08:14 elapi 
-rw-rwSr-- 1 tomcat appsadmins 10577 Jun 30 08:14 extras.html 
drwxrwsr-x 2 tomcat appsadmins 4096 Jun 30 08:14 funcspecs 
-rw-rwSr-- 1 tomcat appsadmins 30498 Jun 30 08:14 html-manager-howto.html 
drwxrwsr-x 3 tomcat appsadmins 4096 Jun 30 08:14 images 
-rw-rwSr-- 1 tomcat appsadmins 16805 Jun 30 08:14 index.html 
-rw-rwSr-- 1 tomcat appsadmins 11995 Jun 30 08:14 introduction.html 
-rw-rwSr-- 1 tomcat appsadmins 23447 Jun 30 08:14 jasper-howto.html 
-rw-rwSr-- 1 tomcat appsadmins 66799 Jun 30 08:14 jdbc-pool.html 
-rw-rwSr-- 1 tomcat appsadmins 35841 Jun 30 08:14 jndi-datasource-examples-howto.html 
-rw-rwSr-- 1 tomcat appsadmins 54636 Jun 30 08:14 jndi-resources-howto.html 
drwxrwsr-x 2 tomcat appsadmins 4096 Jun 30 08:14 jspapi 
-rw-rwSr-- 1 tomcat appsadmins 34918 Jun 30 08:14 logging.html 
-rw-rwSr-- 1 tomcat appsadmins 75344 Jun 30 08:14 manager-howto.html 
-rw-rwSr-- 1 tomcat appsadmins 8218 Jun 30 08:14 maven-jars.html 
-rw-rwSr-- 1 tomcat appsadmins 8323 Jun 30 08:14 mbeans-descriptor-howto.html 
-rw-rwSr-- 1 tomcat appsadmins 40235 Jun 30 08:14 monitoring.html 
-rw-rwSr-- 1 tomcat appsadmins 13371 Jun 30 08:14 proxy-howto.html 
-rw-rwSr-- 1 tomcat appsadmins 64018 Jun 30 08:14 realm-howto.html 
-rw-rwSr-- 1 tomcat appsadmins 6954 Jun 30 08:14 RELEASE-NOTES.txt 
-rw-rwSr-- 1 tomcat appsadmins 35358 Jun 30 08:14 rewrite.html 
-rw-rwSr-- 1 tomcat appsadmins 16682 Jun 30 08:14 RUNNING.txt 
-rw-rwSr-- 1 tomcat appsadmins 34336 Jun 30 08:14 security-howto.html 
-rw-rwSr-- 1 tomcat appsadmins 30478 Jun 30 08:14 security-manager-howto.html 
drwxrwsr-x 2 tomcat appsadmins 4096 Jun 30 08:14 servletapi 
-rw-rwSr-- 1 tomcat appsadmins 13047 Jun 30 08:14 setup.html 
-rw-rwSr-- 1 tomcat appsadmins 17817 Jun 30 08:14 ssi-howto.html 
-rw-rwSr-- 1 tomcat appsadmins 37032 Jun 30 08:14 ssl-howto.html 
drwxrwsr-x 2 tomcat appsadmins 4096 Jun 30 08:14 tribes 
-rw-rwSr-- 1 tomcat appsadmins 11610 Jun 30 08:14 virtual-hosting-howto.html 
drwxrwsr-x 2 tomcat appsadmins 4096 Jun 30 08:14 WEB-INF 
drwxrwsr-x 2 tomcat appsadmins 4096 Jun 30 08:14 websocketapi 
-rw-rwSr-- 1 tomcat appsadmins 13888 Jun 30 08:14 web-socket-howto.html 
-rw-rwSr-- 1 tomcat appsadmins 22776 Jun 30 08:14 windows-auth-howto.html 
-rw-rwSr-- 1 tomcat appsadmins 22974 Jun 30 08:14 windows-service-howto.html 

[[email protected] manager]$ ls -l 
total 32 
drwxrwsr-x 2 tomcat appsadmins 4096 Jun 30 08:14 images 
-rw-rwSr-- 1 tomcat appsadmins 906 Jun 30 08:14 index.jsp 
drwxrwsr-x 2 tomcat appsadmins 4096 Jun 30 08:14 META-INF 
-rw-rwSr-- 1 tomcat appsadmins 4458 Jun 30 08:14 status.xsd 
drwxrwsr-x 3 tomcat appsadmins 4096 Jun 30 08:14 WEB-INF 
-rw-rwSr-- 1 tomcat appsadmins 4723 Jun 30 08:14 xform.xsl 
+1

你的apache日誌錯誤文件沒有什麼? –

+1

@ cedric.salaun我們目前正在通過直接訪問Tomcat和端口8080進行測試,而Tomcat的訪問日誌顯示爲404.否則,沒有其他的東西了。我有兩個域在Tomcat8本地,Tomcat7在虛擬機上工作,並且比較文件只顯示了一些細微差別,例如配置的端口和域。在目標服務器上,它不起作用。權限問題? – TekiusFanatikus

+1

好的..我不知道tomcat很好,你有一個tomcat的日誌目錄誰可以幫忙嗎?如果不是,你是否讀過這個線程:http://askubuntu.com/questions/107400/tomcat-manager-application-and-http-404-error。可能有幫助... –

回答

0

我得出結論,我遇到的問題與最初安裝和配置的方式有關。

我這樣說,因爲如果我得到最新版本,解壓並啓動它;上面發佈的配置工作。

我不確定現有版本是如何安裝的,我假設它來自回購(我在RHEL 6.7上)。

更新

使用Apache代理到Tomcat的,我們已經加入ProxyPreserveHost On到我們的Apache,以確保合適的經理正在被訪問。

1

如果您希望管理與多個虛擬主機工作,您需要爲每個主機配置管理器。

檢查下列幫助你

Virtual Hosting and Tomcat

+1

我在conf/Catalina下的兩個域文件夾(自動創建的)中都添加了manager.xml。我仍然得到了404.而且,該頁面上的評論並不太積極,哇:) – TekiusFanatikus

1

這裏有,你可以按照步驟 -

  1. 關機的tomcat,清除CATALINA_HOME/works/*CATALINA_HOME/logs/*,然後啓動Tomcat。這樣在故障排除時就不那麼混亂了。

  2. 嘗試並找出請求路由的位置。 你已經提到了404錯誤,這意味着tomcat試圖找到manager並且沒有這麼做。在這種情況下,請求應該登錄在inter_localhost_access_log.txtintra_localhost_access_log.txt。這將幫助你瞭解tomcat試圖在哪裏搜索manager應用程序。

  3. manager應用程序放在tomcat試圖找到的地方。步驟2.會給你在哪裏tomcat正在努力尋找manager

還有一點要注意的線索 - 儘量保持appBase目錄分開。

EG - 應用進入

mkdir $CATALINA_HOME/internet_webapp 
mkdir $CATALINA_HOME/intranet_webapp 

重疊目錄是不允許的。

+1

@ milind-v-acharya我們仍然無處可去。日誌表明正在查詢的路徑是CATALINA_HOME,intranet_webapp/manager/html中的正確路徑。許可問題可能是404的原因嗎?如果是這樣,那麼如何調試呢? – TekiusFanatikus

+1

比較/ docs和/ examples文件權限和文件用戶。確保它們與/ manager相似。您可能需要chmod和chown/manager文件。這可能是因爲你可能已經複製了sudo模式的經理目錄或者作爲不同的用戶。 –

+1

檢查從兩個不同目錄獲得的/ docs頁面確實來自各個目錄而不是單個目錄很重要。您應該在/ docs中放置一個host.html文件並嘗試驗證事實。 /管理器中的index.jsp正在執行response.sendRedirect。如果你打開你的chrome瀏覽器調試器,你將能夠看到tomcat要求你重定向哪個ip地址或哪個域。 –