본문 바로가기
Spring

JK_MOD 설치

by GoodDev 2018. 4. 24.

1. apache 설치

./configure --prefix=/home/findsemusa/apps/apache --htmldir=/home/findsemusa/docs --mandir=/home/findsemusa/apps/apache/htdocs/manual --enable-deflate --libdir=/home/findsemusa/apps/lib --enable-module=ssl --with-ssl --enable-ssl=shared


2. jk 설치

http://apache.tt.co.kr/tomcat/tomcat-connectors/jk/tomcat-connectors-1.2.43-src.tar.gz


가. native 로 이동

나.  configure --with-apxs= 아파치홈/bin/apxs

다. make && make install



3. 환경 설정

가. httpd.conf


# Virtual hosts

Include conf/extra/httpd-vhosts.conf


LoadModule jk_module modules/mod_jk.so

# mod_jk

<IfModule jk_module>


    # We need a workers file exactly once

    # and in the global server

    JkWorkersFile /etc/httpd/conf.d/workers.properties


    # Our JK error log

    # You can (and should) use rotatelogs here

    JkLogFile /etc/httpd/logs/mod_jk.log


    # Our JK log level (trace,debug,info,warn,error)

    JkLogLevel error


    # Our JK shared memory file

    JkShmFile /etc/httpd/logs/mod_jk.shm


    # If you want to put all mounts into an external file

    # that gets reloaded automatically after changes

    # (with a default latency of 1 minute),

    # you can define the name of the file here.

    #JkMountFile conf.d/uriworkermap.properties


</IfModule>


나. workers.properties

worker.list=server1,server2

worker.server1.host=www.a.com
worker.server1.port=8109
worker.server1.type=ajp13

worker.server2.host=www.b.com
worker.server2.port=8209
worker.server2.type=ajp13

다. tomcat server.xml
<Connector port="8109" protocol="AJP/1.3" connectionTimeout="20000" redirectPort="8443" />
<Engine name="Catalina" defaultHost="www.a.com" jvmRoute="server1">
      <Host name="www.a.com"  appBase="webapps"
            unpackWARs="true" autoDeploy="true">

redirectPort ? SSL 사용시라는데.. 음.


댓글