Linux 下配置Tomcat的虛擬路徑
<?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 --> <!DOCTYPE server-xml [ <!ENTITY vhost-localhost SYSTEM "file:///usr/local/tomcat1/conf/vhost/localhost.xml"> ]> <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 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="8084" 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. The default SSLImplementation will depend on the presence of the APR/native library and the useOpenSSL attribute of the AprLifecycleListener. Either JSSE or OpenSSL style configuration may be used regardless of the SSLImplementation selected. JSSE style configuration is used below. --> <!-- <Connector port="8443" protocol="org.apache.coyote.http11.Http11NioProtocol" maxThreads="150" SSLEnabled="true"> <SSLHostConfig> <Certificate certificateKeystoreFile="conf/localhost-rsa.jks" type="RSA" /> </SSLHostConfig> </Connector> --> <!-- Define a SSL/TLS HTTP/1.1 Connector on port 8443 with HTTP/2 This connector uses the APR/native implementation which always uses OpenSSL for TLS. Either JSSE or OpenSSL style configuration may be used. OpenSSL style configuration is used below. --> <!-- <Connector port="8443" protocol="org.apache.coyote.http11.Http11AprProtocol" maxThreads="150" SSLEnabled="true" > <UpgradeProtocol className="org.apache.coyote.http2.Http2Protocol" /> <SSLHostConfig> <Certificate certificateKeyFile="conf/localhost-rsa-key.pem" certificateFile="conf/localhost-rsa-cert.pem" certificateChainFile="conf/localhost-rsa-chain.pem" type="RSA" /> </SSLHostConfig> </Connector> --> <!-- 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> &vhost-localhost; </Engine> </Service> </Server>
相關推薦
linux下配置tomcat虛擬目錄
本文預設jdk、tomcat等都已經在linux上面部署完成 1.開啟tomcat conf 目錄下的server.xml 2.在最底下找到</Host> 3.在該行上面新增<Context docBase="/root/pic" path="/FCS/p
Linux 下配置Tomcat的虛擬路徑
<?xml version="1.0" encoding="UTF-8"?> <!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements
在linux下配置tomcat的虛擬路徑
<Host name="localhost" appBase="webapps" unpackWARs="true" autoDeploy="true"> <Context path="" docBase="de
Myeclipse 2017下的Tomcat虛擬路徑配置
自學到springmvc中的上傳檔案/圖片功能模組時,忽然出現了無法建立tomcat虛擬路徑來儲存圖片的情況 才發現原來自己一直用的Myeclipse 2017自帶的tomcat8.5伺服器 於是..只能再重新設定了
Linux下配置tomcat+apr+native應對高並發
狀態 iptables 安裝jdk 擁有 ack 請求 java_home 基本上 線程數 摘要:在慢速網絡上Tomcat線程數開到300以上的水平,不配APR,基本上300個線程狠快就會用滿,以後的請求就只好等待。但是配上APR之後,Tomcat將以JNI的形式調用A
【IDEA】IDEA中配置tomcat虛擬路徑的兩種方法
-- pan 技術分享 而不是 自帶 配置tomcat .cn http each 首先要確保使用的是本地的tomcat服務器,而不是maven插件。 -------------------------第一種:使用IDEA工具自動配置(推薦這種)----
Linux下配置Tomcat開機啟動
usr 並且 名稱 tex tomcat8 roc jdk1.8 語句 src 復制catalina.sh到/ect/init.d/文件夾下,並修該文件名稱為tomcatsudo mv catalina.sh tomcatsudo chmod 777 /ect/init.d
Linux——在Linux下配置tomcat
前面講了如何在Linux下上傳檔案和配置JDK。(jdk版本需要與tomcat版本相容) 配置tomcat必須先上傳tomcat的壓縮包到Linux中,並配置好JDK。(tomcat包自行下載) 如果不知道如何上傳檔案可以參考上傳檔案到Linux和下載檔案到本地。 如果沒有配置JDK可以
Linux下配置tomcat預設埠為80埠
進入tomcat安裝目錄下的conf目錄,然後編輯service.xml檔案 輸入:/8080,快速搜尋預設埠的位置,然後將其修改80埠 wq儲存退出 [[email protected] conf]# ../bin/shutdown.sh [[email
linux下配置apache虛擬主機解決方案以及一些問題
回南昌了,發現這邊很多公司都是用apache的,上海那邊都是使用nginx伺服器,可見差距啊 博主今天興致來了,正好之前在Mac虛擬機器上配了一臺apache伺服器,於是就到自己Mac虛擬機器上配置虛擬主機吧(老早的時候我是在win上配置的虛擬主機) 1,首先我配置時候,就
Linux和window下tomcat虛擬路徑的配置方式
配置Linux下tomcat虛擬路徑:找到linux下的server.xml檔案,在<Host>標籤內進行如下配置<Host name="localhost" appBase="webapps" unpackWARs="true" a
linux下配置jdk+tomcat
dex com esc size light 默認 mage lib $path 安裝軟件包 下載jdk和tomacat安裝包,我這裏使用的是jdk-8u144-linux-x64.tar.gz和apache-tomcat-8.5.23.tar.gz。 分別解壓這兩個安裝包
Linux下 nginx+tomcat配置https的總結和遇到的坑
master gcc apache ddr code style remote protocol lis 證書的獲取略 服務器的端口443確保外界網絡能夠進行訪問。 是否配置https: nginx:是 tomcat:否 1.首先查看nginx是否支持SSL。 參考鏈接:
linux下配置多個tomcat同時執行
在一臺linux下配置多個tomcat同時執行 詳細步驟如下: 1.在/etc/profile檔案下進行修改配置,如果安裝JDK的時候已經配置了JAVA環境變數,則無需再次配置.同時新增兩組CATALINA環境變數如下: 命令:#vi /etc/profile 如下為我的t
Linux下配置MySQL、MongoDB、Tomcat等軟體和使用
配置阿里雲的yum倉庫 獲取倉庫配置 wgCentos-7.repoet http://mirrors.aliyun.com/repo/ 修改Linux預設的yum配置 將Centos-7.repo中的內容拷貝到/etc/yum.repo.d/CentOS-Base.repo檔案
Linux下配置Nginx+Tomcat叢集
1.安裝和配置Tomcat 由於沒有多臺linux伺服器,因此我是在一臺linux伺服器上部署2個tomcat應用來演示群集,在/usr/local/下建立2個目錄,分別為tomcat1和tomcat2,然後將實現準備好的tomcat壓縮包,解壓到這2個目錄中 然後將tomcat2配置
Linux下Nginx+Tomcat負載均衡和動靜分離配置要點
cep 修改 div -c user setsebool index.php sebool bool 本文使用的Linux發行版:CentOS6.7 下載地址:https://wiki.centos.org/Download 一、
Linux下 JDK + Tomcat + jenkins安裝配置
JDK安裝 1.解壓 tar -zxvf jdk-8u181-linux-x64.tar.gz 2.重名名後移動到 /usr/目錄下 mv jdk-8u181-linux-x64 jdk sudo mv jdk /usr 3. 新增環境變數 sudo vim /etc/
Linux下配置多個tomcat
Linux環境下部署多臺tomcat伺服器,最近用到虛擬機器就順便整理一個親測的方法,下面用虛擬機器環境示範: 1、原理簡述: 1.1 tomcat啟動時會去查詢tomcat的根目錄,並且會通過CATALINA_BASE和CATALINA_HOME 這兩個變數
Linux下 JDK + Tomcat + jenkins安裝配置
JDK安裝 1.解壓 tar -zxvf jdk-8u181-linux-x64.tar.gz 2.重名名後移動到 /usr/目錄下 mv jdk-8u181-linux-x64 jdk sudo mv jdk /usr 3. 新增環境變數 sudo vim /etc/profile