2019/11/28

tomcat libapache2-mod-jk 연동

sudo apt-get install libapache2-mod-jk

ajp 아파치와 통신을 위해 설정.
vi /etc/apache2/workers.properties
worker.list=gfltomcat1
worker.tomcat1.port=8009
worker.tomcat1.host=x.x.x.x
worker.tomcat1.type=ajp13
worker.tomcat1.lbfactor=20

jk 모듈 설정파일 설정.
vi /etc/apache2/mods-available/jk.conf

    #JkWorkersFile /etc/libapache2-mod-jk/workers.properties
    JkWorkersFile /etc/apache2/workers.properties
   
    <Location /jk-status>
        # Inside Location we can omit the URL in JkMount
        #JkMount jk-status
        #Order deny,allow
        #Deny from all
        #Allow from 127.0.0.1
    </Location>
    <Location /jk-manager>
        # Inside Location we can omit the URL in JkMount
        #JkMount jk-manager
        #Order deny,allow
        #Deny from all
        #Allow from 127.0.0.1
    </Location>

아파치 웹서버 수정
/etc/apache2/sites-available/user-fbox-league.fairlineai.com
JkMount /* gfltomcat1

톰캣 수정
sudo vi /etc/tomcat8/server.xml

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

주석 처리 되었다면 해제한다.

아파치와 톰캣 재시작
sudo /etc/init.d/apache2 restart
sudo /srv/www/league.fairlineai.com/bin/startup.sh

브라우저 확인
http://ip:8080
http://ip

댓글 없음:

댓글 쓰기