Develope/WEB

[mod_jk] 개요 및 설치

고로이 2018. 11. 27. 11:27
반응형


** mod_jk(Tomcat Connectors)

- Tomcat 프로젝트에서 제공하는 웹서버 연동모듈

- https://tomcat.apache.org/download-connectors.cgi


**mod_jk 기능

- Woker 감시 기능(Cping/Cpong)

- Connection Pooling

- Sticky Session

- Retry(Recovery)

- Load Balance

- worker Status 관리


**설치

root 계정으로 로그인 : su - 

다운로드 : wget http://www-eu.apache.org/dist/tomcat/tomcat-connectors/jk/tomcat-connectors-1.2.43-src.tar.gz 

압축해제 : tar -zxvf tomcat-connectors-1.2.43-src.tar.gz

디렉터리 이동 : cd tomcat-connectors-1.2.37-src/native/ 

구성 

- ./buildconf.sh 

- ./configure --with-apxs=/~/apache2.4/bin/apxs 

컴파일 : make 

설치 : make install 


확인 

- cd /~/apache2.4/modules 

- ls –al mod_j*


**모듈 적용

설정파일 디렉토리로 이동 > cd /~/apache2.4/conf 

설정파일 편집 



- httpd.conf

Include conf/mod-jk.conf


<VirtualHost *:80>

        DocumentRoot /~/apache-tomcat-7.0.86/webapps

        ServerName localhost

        ErrorLog logs/localhost_error.log

        CustomLog logs/localhost_access.log common

        <Directory "/app/apache-tomcat-7.0.86/webapps">

                Options Indexes FollowSymLinks

                AllowOverride All

                Require all granted

        </Directory>

</VirtualHost>


- vi mod-jk.conf

# mod_jk settings LoadModule jk_module modules/mod_jk.so


<IfModule mod_jk.c>

JkWorkersFile conf/workers.properties

JkLogFile "|/app/apache2.4/bin/rotatelogs

logs/mod_jk.log%Y%m%d 86400"

JkLogLevel info

JkLogStampFormat "[%a %b %d %H:%M:%S %Y]"

JkOptions +ForwardkeySize +ForwardURICompatUnparsed -ForwardDirectories

JkRequestLogFormat "%w %V %T"

JkMountFile conf/uriworkermap.properties


</IfModule>



- vi workers.properties
worker.list=tomcat1, jkstatus
worker.tomcat1.port=8009
worker.tomcat1.host=127.0.0.1
worker.tomcat1.type=ajp13
worker.tomcat1.lbfactor=1
worker.jkstatus.type=status

- uriworkermap.properties

/hello=tomcat1

/*.jsp=tomcat1



반응형

'Develope > WEB' 카테고리의 다른 글

Vue 프로젝트 구성 (intelliJ)  (0) 2020.10.03
VueJS의 핵심 기능  (0) 2020.10.02
JS 프레임워크 비교하기  (0) 2020.09.14
[FullCalendar] 기능정리  (0) 2019.07.18
[Apache http]  (2) 2018.11.27