dcsimg
Integrated apache and tomcat
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Anonymous
Posted On:   Tuesday, April 12, 2011 12:51 PM

Hi, 2 days i have been trying integrated apache and tomcat but still not success. Hope that anyone can help me solve it. Got a vps with domain name for example mydomain.com 1) I installed a tomcat 6.0.23 in vps CATALINA_HOME=/usr/share/as/apache-tomcat-6.0.32 2) Download latest jk-1.2.31 file mod_jk-1.2.31-httpd-2.2.x.so at http://www.apache.org/dist/tomcat/tomcat-connectors/jk/binaries/linux/jk-1.2.31/i386/ 3) rename mod_jk-1.2.31-httpd-2.2.x.so to mod_jk.so and put in under directory /etc/httpd/modules 4) In my CATALINA_HOME/conf/server.xml, inside section, i put below listener to let tomcat auto generate the jk conf file for me. 5) I run the tomcat with s   More>>
			
Hi,

2 days i have been trying integrated apache and tomcat but still not success. Hope that anyone can help me solve it.

Got a vps with domain name for example mydomain.com

1) I installed a tomcat 6.0.23 in vps CATALINA_HOME=/usr/share/as/apache-tomcat-6.0.32

2) Download latest jk-1.2.31 file mod_jk-1.2.31-httpd-2.2.x.so at http://www.apache.org/dist/tomcat/tomcat-connectors/jk/binaries/linux/jk-1.2.31/i386/

3) rename mod_jk-1.2.31-httpd-2.2.x.so to mod_jk.so and put in under directory /etc/httpd/modules

4) In my CATALINA_HOME/conf/server.xml, inside section, i put below listener to let tomcat auto generate the jk conf file for me.



5) I run the tomcat with service tomcat start, http://www.mydomain.com:8080 able to load tomcat main page and 2 directories are auto generated for me inside CATALINA_HOME/conf, which is auto and jk.

6) Then, i copy the file CATALINA_HOME/conf/auto/mod_jk.conf which automatically generated by tomcat and put inside CATALINA_HOME/conf/jk. Content of the file as below

########## Auto generated on Tue Apr 12 14:19:08 MSD 2011##########

LoadModule jk_module "/etc/httpd/modules/mod_jk.so"


JkShmFile /usr/share/as/apache-tomcat-6.0.32/conf/jk/mod_jk.shm
JkLogFile /usr/share/as/apache-tomcat-6.0.32/conf/jk/mod_jk.log
JkLogLevel error
JkLogStampFormat "[$a %b %d %H:%M:%S %Y] "


ServerName localhost

JkMount /manager ajp13
JkMount /manager/* ajp13

JkMount /docs ajp13
JkMount /docs/* ajp13

JkMount /examples ajp13
JkMount /examples/* ajp13

JkMount /host-manager ajp13
JkMount /host-manager/* ajp13


7) Then i create a workers.properties inside CATALINA_HOME/conf/jk as content below

worker.list=ajp13
worker.default.port=8009
worker.default.host=localhost
worker.default.type=ajp13
worker.default.libfactor=1

8) I restart my tomcat with command service tomcat restart. Page able to access with http://www.mydomain.com:8080

9) 1 restart my httpd with command service httpd restart. Page able to access with http://www.mydomain.com

But finally i tested to run the examples and docs without the port 8080 but it give me 404 page not found error. http://www.mydomain.com/examples or http://www.mydomain.com/docs

I able to access with port 8080 but without 8080, page will not display. So, this is means by JK connector will not successfully integrated my apache and tomcat right? Can you help me with that?

Thanks,
Teoh
   <<Less
About | Sitemap | Contact