Tuesday, December 24, 2013

Apache with Tomcat Integration

Installing Apache by using GUI Mode in windows and integration with Tomcat:
1)Install apache from the Source path :“E:\Education\Softies dumps\apache_2.2.3-win32-x86-no_ssl”
2)Just simple wizard – follow next button
3)Hit the URL: http://webservicesm.blogspot.in:80/ in any browser
4)You will get “it works!”
Installing Tomcat by using GUI Mode in windows:
1)Install Tomcat from the Source path ” :\Education\Softies dumps\apache-tomcat-6.0.14”
2)Double click on it
3)Go to TOMCAT_HOME/bin and run or double click startup.bat
4)Hit the URL to get the Tomcat Console http://webservicesm.blogspot.in:8080/ in browser
Steps to integrate Apcahe with Tomcat :
1)Stop both servers(Apache & Tomcat )
Download “Tomcat-connectors-1.2.27-src.zip” and unzip it.
Copy the following files from “E:\Education\tomcat-connectors-1.2.27-src\tomcat-connectors-1.2.27-src\conf”

uriworkermap.properties
workers.properties
workers.properties.minimal
To tomcat Conf folder “C:\Program Files\Apache Software Foundation\Tomcat 6.0\conf”
2. Download tomcat connector “mod_jk-1.2.27-httpd-2.2.10.so” from the following path
http://archive.apache.org/dist/tomcat/tomcat-connectors/jk/source/
3. Rename from “mod_jk-1.2.27-httpd-2.2.10.so” to “mod_jk.so” (by default it will come)
4. Copy “mod_jk.so” and paste in here – “C:\Program Files\Apache Software Foundation\Apache2.2\modules”
Configure Apache 1. Open “httpd.conf” from “C:\Program Files\Apache Software Foundation\Apache2.2\conf”
2. Add the following code snippet at the end of the file “httpd.conf”
LoadModule jk_module "C:/Program Files/Apache Software Foundation/Apache2.2/modules/mod_jk.so"
JkWorkersFile "C:/Program Files/Apache Software Foundation/Tomcat 6.0/conf/workers.properties"
JkLogFile "C:/Program Files/Apache Software Foundation/Tomcat 6.0/conf/from_apache_mod_jk.log"
#JkLogLevel info
#JkLogStampFormat "[%a %b %d %H:%M:%S %Y]"
#Send servlet for context /examples to worker named ajp13
#JkMount /examples ajp13
# Send JSPs for context /examples/* to worker named ajp13
#JkMount /hello/* ajp13
#DocumentRoot /webapps/hello
ServerName localhost
JkMount /hello ajp13
JkMount /hello/* ajp13
Configure Tomcat
3. Open worker.properties from:
C:\Program Files\Apache Software Foundation\Tomcat 6.0\conf \conf\worker.properties and add the below enteries into it.
worker.list=ajp13
worker.ajp13.port=8010
worker.ajp13.host=localhost
worker.ajp13.type=ajp13
4. Open “server.xml” from “C:\Program Files\Apache Software Foundation\Tomcat 6.0\conf\server.xml”
5. Add the below enteries in "Server" and "Host " tags
listener classname="org.apache.jk.config.ApacheConfig" modjk="C:/Program Files/Apache Software Foundation/modules/mod_jk.so"
6. Map the doc base by below enteries in "host" tag
Host name="localhost" appBase="webapps"
unpackWARs="true" autoDeploy="true"
xmlValidation="false" xmlNamespaceAware="false
Context path="/" docBase="webapps/(application name)" debug="1" reloadable="true"
7. Start both the server’s and deploy

No comments:

Post a Comment