Apache – tomcat 연동 virtualhost 사용

mod_jk를 사용하여 apache와 톰캣을 연동한다.

mod_jk 다운로드 : http://tomcat.apache.org/download-connectors.cgi

httpd.conf

#TOMCAT
LoadModule jk_module /ssw/apps/apache/modules/mod_jk-1.2.31-httpd-2.2.x.so

<IfModule jk_module>
JkWorkersFile /ssw/apps/apache/modules/jk_module/workers.properties
JkShmFile    /ssw/log/apache/mod_jk/mod_jk.shm
JkLogFile    /ssw/log/apache/mod_jk/mod_jk.log
JkLogLevel   trace
JkLogStampFormat "[%a %b %d %H:%M:%S %Y]"
#JkMount /*.jsp worker1
#JkMountCopy On
</IfModule>

httpd-vhosts.conf

<VirtualHost *:80>
ServerAdmin admin@adonsocial.com
DocumentRoot "/ssw/web/docs/dev"
ServerName dev.adonsocial.com
ErrorLog "/ssw/log/apache/docs/dev/error_log"
CustomLog "/ssw/log/apache/docs/dev/access_log" common
JkMount /*.jsp worker1
JkMountCopy On
</VirtualHost>