在线观看不卡亚洲电影_亚洲妓女99综合网_91青青青亚洲娱乐在线观看_日韩无码高清综合久久

鍍金池/ 問答/Linux/ tomcat 如何訪問其它目錄下的war包,不是在tomcat/webapps下

tomcat 如何訪問其它目錄下的war包,不是在tomcat/webapps下?

因項目需要,打包的war包放到 centos7的目錄/data/wwwroot/default目錄下,但是設(shè)置了tomcat的conf/server.xml還是訪問不了,求解!

<?xml version="1.0" encoding="UTF-8"?>
 <Server port="8006" shutdown="SHUTDOWN">
<Listener className="org.apache.catalina.core.JreMemoryLeakPreventionListener"/>
<Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener"/>
<Listener className="org.apache.catalina.core.ThreadLocalLeakPreventionListener"/>
<Listener className="org.apache.catalina.core.AprLifecycleListener"/>
<GlobalNamingResources>
  <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>
<Service name="Catalina">
  <Connector port="8080"
            protocol="HTTP/1.1"
            connectionTimeout="20000"
            redirectPort="8443"
            maxThreads="1000"
            minSpareThreads="20"
            acceptCount="1000"
            maxHttpHeaderSize="65536"
            debug="0"
            disableUploadTimeout="true"
            useBodyEncodingForURI="true"
            enableLookups="false"
            URIEncoding="UTF-8"/>
  <Engine name="Catalina" defaultHost="localhost">
    <Realm className="org.apache.catalina.realm.LockOutRealm">
      <Realm className="org.apache.catalina.realm.UserDatabaseRealm"
             resourceName="UserDatabase"/>
    </Realm>
    <Host name="localhost" appBase="/data/wwwroot/default" unpackWARs="true" autoDeploy="true">
      <Context path="" docBase="/data/wwwroot/default" debug="0" reloadable="false" crossContext="true"/>
      <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
        prefix="localhost_access_log." suffix=".txt" pattern="%h %l %u %t &quot;%r&quot; %s %b" />
    </Host>
  </Engine>
</Service>
</Server>
回答
編輯回答
若相惜

你這個需求有些怪異,為什么要換目錄呢?你可以把tomcat更換到你所需要的目錄下執(zhí)行。

2018年5月30日 04:46