아파치2 톰캣6연동

setup 2011.07.27 12:24


참고 url: http://www.zoomup.kr/skin/board/mw.basic/mw.proc/mw.print.php?bo_table=server&wr_id=8

기존의 안되던 연동에서 내가 고친부분
아파치 conf/workers.properties 에서
===================================================================================================
workers.tomcat_home=/usr/local/tomcat
workers.java_home=/usr/local/java
ps=/
worker.list=ajp13 =>worker의 이름

worker.ajp13.port=8009
worker.ajp13.host=somedomain.com
worker.ajp13.type=ajp13   =>얜 그냥 타입임
worker.ajp13.lbfactor=1
===================================================================================================

아파치 conf/uriworkermaps.properties 파일 추가해줌 =>.do나 .jsp로 끝나는건 탐캣으로 넘기겠다
===================================================================================================
/*.do=ajp13
/*.jsp=ajp13
===================================================================================================

아파치.conf/httpd.conf
===================================================================================================
#
#Mod_jk settings
#
<IfModule jk_module>
   JkWorkersFile conf/workers.properties
   JkLogFile logs/mod_jk.log
   JkLogLevel error
   JkLogStampFormat "[%a %b %d %H:%M:%S %Y]"
</ifModule>
===================================================================================================

아파치 conf/extra/httpd-vhosts.conf
===================================================================================================
<VirtualHost *:80>
    ServerAdmin webmaster@dummy-host2.example.com
    DocumentRoot "/usr/local/tomcat/webapps"
    JkMountFile /usr/local/apache/conf/uriworkermaps.properties
    ServerName somedomain.com
    ErrorLog "logs/dummy-host2.example.com-error_log"
    CustomLog "logs/dummy-host2.example.com-access_log" common
</VirtualHost>
===================================================================================================

톰캣의 conf/server.xml
===================================================================================================
    <!-- Connector port="8080" protocol="HTTP/1.1"   =>톰캣만으로 돌리는 port 주석처리
               connectionTimeout="20000"
               redirectPort="8443" / -->


<Engine name="Catalina" defaultHost="somedomain.com">
===================================================================================================

이렇게 설정을 바꿔주고 tomcat 과 아파치를 재시작하니
연동이 되었다.

Posted by verynyang poppy


티스토리 툴바