하나의 톰캣서버에서 여러 웹서비스를 운영하기 위한 server.xml 설정 방법


<?xml version="1.0" encoding="UTF-8"?>

<Server port="8005" shutdown="SHUTDOWN">

    <Listener className="org.apache.catalina.core.AprLifecycleListener" SSLEngine="on" />

    <Listener className="org.apache.catalina.core.JasperListener" />

    <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="Catalina">

        <Connector port="80" protocol="HTTP/1.1" maxThreads="500" connectionTimeout="20000"

            redirectPort="8443" URIEncoding="UTF-8" />

        <Connector port="8009" protocol="AJP/1.3" redirectPort="8443" />

        <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="C:/apache-tomcat-7.0.61/webapps/ROOT" unpackWARs="true" autoDeploy="true">

<Context path="" docBase="." reloadable="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>

   

    <Service name="Catalina2">

        <Connector port="8080" protocol="HTTP/1.1" maxThreads="500" connectionTimeout="20000"

            redirectPort="8443" URIEncoding="UTF-8" />

        <Connector port="8009" protocol="AJP/1.3" redirectPort="8443" />

        <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="C:/apache-tomcat-7.0.61/webapps/test" unpackWARs="true" autoDeploy="true">

<Context path="" docBase="." reloadable="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>





Posted by motolies

댓글을 달아 주세요