독까의 이야기

 
Apache2\conf\httpd.conf 수정

NameVirtualHost *:80

<VirtualHost *:80>
    ServerName tomcat1.gunnm.com
    ServerAdmin admin@gunnm.com
    DocumentRoot "C:\tomcat1\webapps\ROOT"
JkMount /* tomcat1
JkMount /*.jsp tomcat1
</VirtualHost>

<VirtualHost *:80>
    ServerName tomcat2.gunnm.com
    ServerAdmin admin@gunnm.com
    DocumentRoot "C:\tomcat2\webapps\ROOT"
JkMount /* tomcat2
JkMount /*.jsp tomcat2
</VirtualHost>

LoadModule jk_module modules/mod_jk.so
JkWorkersFile conf/workers.properties
JkLogFile logs/mod_jk.log
# Set the jk log level [debug/error/info]
JkLogLevel error
JkLogStampFormat "[%a %b %d %H:%M:%S %Y]"


Apache2\conf\workers.properties 파일 생성

worker.list=tomcat1,tomcat2

worker.tomcat1.type=ajp13
worker.tomcat1.host=localhost
worker.tomcat1.port=8009
#worker.tomcat1.lbfactor=1

worker.tomcat2.type=ajp13
worker.tomcat2.host=localhost
worker.tomcat2.port=8010
#worker.tomcat2.lbfactor=1



tomcat1\conf\server.xml AJP 설정 변경
    <Connector port="8009" protocol="AJP/1.3" redirectPort="8443" enableLookups="false" URIEncoding="UTF-8" />

tomcat2\conf\server.xml AJP 설정 변경
    <Connector port="8010" protocol="AJP/1.3" redirectPort="8443" enableLookups="false" URIEncoding="UTF-8" />