Tomcat 8.5 기준 server.xml 을 아래와 같이 셋팅하면 톰캣하나로 여러개의
컨테이너 운영이 가능하다
<?xml version='1.0' encoding='utf-8'?>
<Server port="18090" shutdown="SHUTDOWN">
<Listener className="org.apache.catalina.startup.VersionLoggerListener" />
<Listener className="org.apache.catalina.core.AprLifecycleListener" SSLEngine="on" />
<Listener className="org.apache.catalina.core.JreMemoryLeakPreventionListener" />
<Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />
<Listener className="org.apache.catalina.core.ThreadLocalLeakPreventionListener" />
<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="CatalinaExt">
<Connector port="8090" protocol="HTTP/1.1"
connectionTimeout="20000"
URIEncoding="euckr"
redirectPort="28090" />
<Connector port="38090" protocol="AJP/1.3" redirectPort="28090" />
<Engine name="CatalinaExt" defaultHost="localhost">
<Realm className="org.apache.catalina.realm.LockOutRealm">
<Realm className="org.apache.catalina.realm.UserDatabaseRealm"
resourceName="UserDatabase"/>
</Realm>
<Host name="localhost" appBase="/opt/ext-apache-tomcat-8.0.39/works/ext"
unpackWARs="true" autoDeploy="true">
<Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs/access/ext"
prefix="localhost_access_log" suffix=".txt"
pattern="%h %l %u %t "%r" %s %b" />
</Host>
</Engine>
</Service>
<Service name="CatalinaExt2">
<Connector port="8091" protocol="HTTP/1.1"
connectionTimeout="20000"
URIEncoding="utf-8"
redirectPort="28091" />
<Connector port="38091" protocol="AJP/1.3" redirectPort="28091" />
<Engine name="CatalinaExt2" defaultHost="localhost">
<Realm className="org.apache.catalina.realm.LockOutRealm">
<Realm className="org.apache.catalina.realm.UserDatabaseRealm"
resourceName="UserDatabase"/>
</Realm>
<Host name="localhost" appBase="/opt/ext-apache-tomcat-8.0.39/works/ext2"
unpackWARs="true" autoDeploy="true">
<Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs/access/ext2"
prefix="localhost_access_log" suffix=".txt"
pattern="%h %l %u %t "%r" %s %b" />
</Host>
</Engine>
</Service>
</Server>
'SERVER > TOMCAT' 카테고리의 다른 글
톰캣 설치 (0) | 2017.12.06 |
---|---|
톰캣 튜닝 (0) | 2017.12.06 |
JVM 메모리 구조와 JAVA OPTION 값 정리 (0) | 2017.12.06 |
톰캣 서버 설정 참조 (0) | 2017.01.16 |
64비트 데이터모델을 써보자 (0) | 2016.01.26 |
Apache Tomcat reload (java 파일 변경 내역 자동반영) (0) | 2015.11.03 |
Tomcat 7 에서 web.xml에 사라졌다. (0) | 2015.04.07 |
[OS][LINUX][apache][tomcat]was/web 연동 (0) | 2014.05.13 |