Thursday, January 3, 2008

Hi , to all...........
I am posting this tutorial.... because I have face some problems while hosting multiple technology namely jsp and php application under same domain name.........so after little bit search/research I came to know about two techniques to get the solution of this problem..............

1.Enable the php support (Run php application) in Tomacat(Any version that you are using)
Please refer to this link for further information on how to achieve this


2.Integration of Tomcat with Apache
I will emphasis on this technique because in this case you have to anyway go through the apache and tomcat integration so you will have really good server configuration in other words you have to mandatorily integrate them in this case.
Please refer to this link

It is explained in detail why generally tomcat and apache are integrated

In the first case it is not mandatory to integrate tomcat with apache.

Apart from that if you have some knowledge about the Virtual hosting its really good..........if you want more information on this topic please refer the following
link:

Okey to start with .......first thing in this case dont do any configuration in tomcat aprt from running it on the port other that 80.

Then Add the file with name [workers.properties] in the [conf] folder of your apache server with the following piece of code

workers.tomcat_home={E:\Tomcat4--in your case absolute path of tomcat on your system}
workers.java_home={C:\Program Files\java\jre1.6.0_03\bin --path to java home}
ps=/
worker.list=default

worker.default.port=8009
worker.default.host=localhost
worker.default.type=ajp13
worker.default.lbfactor=1

Then download the mod_jk connector from the link
and place it in the modules folder of the apche server


Then add the following lines code in the [httpd.conf] file of in the [conf] folder of the apache sever

#Apache tomcat connector configuration---------------------Starts here---------------------

#
# Mod_jk settings
#
# Load mod_jk module
LoadModule jk_module modules/mod_jk.so
# Where to find workers.properties
JkWorkersFile conf/workers.properties
# Where to put jk logs
JkLogFile logs/mod_jk.log
# Set the jk log level [debug/error/info]
JkLogLevel debug
# Select the log format
JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "
# JkOptions indicate to send SSL KEY SIZE,
JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
# JkRequestLogFormat set the request format
JkRequestLogFormat "%w %V %T"
# Send JSPs for context /jsp-examples to worker named default
#JkMount /app1/* default
#JkMount /app2/* default

#Apache tomcat configuration----Ends Here--------------

Please note that whatever I have written above here is not very detail , If you have any problems doing this you can contact me.........
vivekb@cdac.in