ÃֽŠ°Ô½Ã±Û(OS/WAS)
2018.03.12 / 01:07

install apache2 + tomcat8, use mod_jk on amazon - ec2

ÈÞ°í
Ãßõ ¼ö 199

install apache2 + tomcat8, use mod_jk on amazon - ec2



Ãâó : http://www.serveridol.com/2015/02/03/how-do-i-install-mod_jk-on-apache-2-4-webserver/

How do I install mod_jk on Apache 2.4 webserver

1. yum install httpd24
2. yum install mod24_ssl
3. yum install gcc*

4. install tomcat-connectors-1.2.40
# wget http://apache.bytenet.in/tomcat/tomcat-connectors/jk/tomcat-connectors-1.2.40-src.tar.gz
# tar -zxvf tomcat-connectors-1.2.40-src.tar.gz
# cd tomcat-connectors-1.2.40-src 
# cd native
# ./configure --with-apxs=/usr/bin/apxs
# make && make install


5. create file .conf

cat /etc/httpd/conf.d/jk.conf
------------------------------
LoadModule jk_module /etc/httpd/modules/mod_jk.so
JkWorkersFile /etc/httpd/conf.d/workers.properties
JkShmFile /var/log/httpd/mod_jk.shm
JkLogFile /var/log/httpd/mod_jk.log
JkLogLevel info
JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "
------------------------------

6.create file 

touch /var/log/httpd/mod_jk.shm /var/log/httpd/mod_jk.log

6. create file 

cat workers.properties
------------------------------
worker.list=worker1
# Set properties for worker1 (ajp13)
worker.worker1.type=ajp13
worker.worker1.host=localhost
worker.worker1.port=8009


7. edit /usr/local/Apache_Tomcat/conf/server.xml


www.test.com




8. /etc/httpd/conf.d/javahost.conf


ServerName test.com
ServerAlias www.test.com
DocumentRoot /home/test/public_html
DirectoryIndex index.html
Alias / /home/test/public_html
JkMount /*.jsp worker1
JkMount /* worker1