server.xml 을 아래와 같이 수정하면 서로 다른 서비스를 포트만 바꿔서 제공할 수 있다
<Server port="8005" shutdown="SHUTDOWN" debug="0">
<Listener
className="org.apache.catalina.mbeans.ServerLifecycleListener"
debug="0"/>
<Listener
className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener"
debug="0"/>
<GlobalNamingResources>
<Environment
name="simpleValue" type="java.lang.Integer" value="30"/>
<Resource
name="UserDatabase" auth="Container"
type="org.apache.catalina.UserDatabase"
description="User database
that can be updated and saved">
</Resource>
<ResourceParams name="UserDatabase">
<parameter>
<name>factory</name>
<value>org.apache.catalina.users.MemoryUserDatabaseFactory</value>
</parameter>
<parameter>
<name>pathname</name>
<value>conf/tomcat-users.xml</value>
</parameter>
</ResourceParams>
</GlobalNamingResources>
<Service
name="Catalina">
<Connector port="8080"
maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
enableLookups="false" redirectPort="8443" acceptCount="100"
debug="0" connectionTimeout="20000"
disableUploadTimeout="true"
URIEncoding="KSC5601"/>
<Connector port="8009"
enableLookups="false"
redirectPort="8443" debug="0"
protocol="AJP/1.3" />
<Engine name="Catalina" defaultHost="localhost" debug="0">
<Logger className="org.apache.catalina.logger.FileLogger"
prefix="catalina_log." suffix=".txt"
timestamp="true"/>
<Realm
className="org.apache.catalina.realm.UserDatabaseRealm"
debug="0" resourceName="UserDatabase"/>
<Host name="localhost"
debug="0" appBase="webapps"
unpackWARs="true"
autoDeploy="true"
xmlValidation="false"
xmlNamespaceAware="false">
<Logger
className="org.apache.catalina.logger.FileLogger"
directory="logs"
prefix="localhost_log."
suffix=".txt"
timestamp="true"
/>
</Host>
</Engine>
</Service>
<!-- pay.csc.go.kr -->
<Service
name="Catalina4">
<Connector acceptCount="100"
connectionTimeout="20000" disableUploadTimeout="true" port="8084"
redirectPort="8443" maxSpareThreads="75" maxThreads="150" minSpareThreads="25"
URIEncoding="KSC5601">
</Connector>
<Connector
port="8014" protocol="AJP/1.3"
protocolHandlerClassName="org.apache.jk.server.JkCoyoteHandler"
redirectPort="8443">
</Connector>
<Engine
defaultHost="localhost" name="Catalina4">
<Host
appBase="webapps4" name="localhost">
<Valve
className="org.apache.catalina.valves.AccessLogValve"
directory="logs"
prefix="localhost_payportal_access_log."
suffix=".txt"
pattern="%t [%a] [%l] [%m] [%U] [%H] [%q] [%s]
[%b] [%{User-Agent}i] [%{Referer}i]"
resolveHosts="false"
/>
<Logger
className="org.apache.catalina.logger.FileLogger"
prefix="localhost_payportal_log." suffix=".txt" timestamp="true"/>
</Host>
<Logger
className="org.apache.catalina.logger.FileLogger"
prefix="catalina_payportal_log." suffix=".txt" timestamp="true"/>
<Realm className="org.apache.catalina.realm.UserDatabaseRealm"/>
</Engine>
</Service>
</Server>
[출처] 톰켓설정 - 여러 포트로 서비스 하기 |작성자 실시리
'JAVA' 카테고리의 다른 글
JSP에서 엑셀로 받기/저장시 한글깨짐현상 (0) | 2009.09.03 |
---|---|
톰켓에서 여러 도메인을 동시에 서비스하도록 설정 (0) | 2009.01.13 |
workers.properties.minimal (0) | 2009.01.08 |
Iis6.0 + tomcat5.5 설치하기 (0) | 2009.01.08 |
va 이제 C#을 제압한다 (0) | 2007.05.02 |