

Sent from BlackBerry® on Airtel
-----Original Message-----
From:
sitaram.pv@polaris.co.in
Date: Fri, 26 Nov 2010 15:26:00
To: <
srampv@gmail.com>
Cc: <
sitaram.pv@polaris.co.in>
Subject: Tomcat and Apache Integration
Hi All,
Today I am gonna discuss about Apache Webserver integration with Apache
Tomcat .
Apache Webserver is fully secured and Integrated webserver . We can very
well integrate with Apache tomcat by using tomcat connectors called as
Mod_jk which is useful to integrate the Apache tomcat to make connection
with Apache httpd web server vicw versa
Before this integration you should have basic understanding Apacher server
. how it works
Apache Webserver has below folder structure
(Embedded image moved to file: pic26046.jpg)
conf : folder is for all configurations
htdocs : here we can deploy content
cgi-bin : perl related files will be kept here only
modules : here we can install new module (mod_jk so files will be ket here
only )
Requirements :
Apache webserver : 2.2.4 version
mod_jk : 1.2.23
tomcat : 6.0 version
Installation procedure
1)copy 1.2.23 mod_jk so files in apache webserver modules folder
2)put following lines in httpd.conf
3)LoadModule jk_module modules/
mod_jk-apache-2.2.4.so
JkWorkersFile conf/worker.properties
JkLogFile logs/mod_jk.log
JkLogLevel error
JkMount /shoptomcat2
JkMount /shop/* tomcat2
JkMount /cart tomcat2
JkMount /cart * tomcat2
JkMount /root tomcat2
JkMount /root/* tomcat2
JkMount /www tomcat2
JkMount /www/* tomcat2
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_ftp_module modules/mod_proxy_ftp.so
LoadModule proxy_http_module modules/mod_proxy_http.so
LoadModule proxy_connect_module modules/mod_proxy_connect.so
(Embedded image moved to file: pic30993.jpg)
4)create worker.properties file as follows in conf folder
workers.tomcat_home=\apache-tomcat-6.0\apache-tomcat-6.0.29
workers.java_home= C:\Program Files\Java\jdk1.6.0_14
ps=/
worker.list=tomcat,loadbalancer,tomcat
worker.tomcat.port=8009
worker.tomcat.host=192.168.100.2
worker.tomcat.type=ajp13
worker.tomcat.lbfactor=1
Tomcat Side:
5) open ajp port in your tomcat server.xml file as followes
<!-- Define an AJP 1.3 Connector on port 8009 -->
<Connector port="8009" protocol="AJP/1.3" redirectPort="8443" />
6) create mod_jk.conf file in your tomcat conf directory with following
content
<IfModule !mod_jk.c>
LoadModule jk_module modules/
mod_jk-apache-2.2.4.so
</IfModule>
JkWorkersFile apache-tomcat-6.0\apache-tomcat-6.0.29
\conf\workers.properties"
JkLogFile "apache-tomcat-6.0\apache-tomcat-6.0.29\logs\mod_jk.log"
JkLogLevel all
<VirtualHost * >
JkMount /root tomcat
JkMount /root/* tomcat
</VirtualHost>
7) create workers.properties file with following content in your tomcat
conf directory
workers.tomcat_home=apache-tomcat-6.0\apache-tomcat-6.0.29
workers.java_home= C:\Program Files\Java\jdk1.6.0_14
ps=/
worker.list=tomcat,loadbalancer
worker.tomcat.port=8009
worker.tomcat.host=192.168.100.2
worker.tomcat.type=ajp13
worker.tomcat.lbfactor=1
worker.loadbalancer.type=lb
worker.loadbalancer.balanced_workers=tomcat
worker.loadbalancer.sticky_session=1
8)Then restart your tomcat server first and apache webserver next
so that mod_jk looks for tomcat defined in your workers.properties file
9) check that logs in Apache webserver logs folder especially access.log
and error.log
which will give compatibility related errors and access permissions
If everything coreect and no errors your apache webserver could connect
to Tomcat appserver
Please wait for next post which says about Ext JS working functionality
Comments