Hi Alan,
 

Here it goes.................
 
Machine  A (Apache), Machine B (tomcat)  (both running on solaris)
—---------------------------------------------
 
httpd.conf changes...
—---------------------
Below # LoadModule foo_module modules/mod_foo.so
 
Add following lines
#
# Load mod_jk
#
 LoadModule jk_module libexec/mod_jk.so
#
# Configure mod_jk
#
JkWorkersFile conf/workers.properties
JkLogFile logs/mod_jk.log
JkLogLevel debug
 
Below DocumentRoot "/usr/local/apache/htdocs"
 
Add following lines...
 
JkMount /examples ajp13
JkMount /examples/* ajp13
 
(if you want to configure a application examples running under webapps on tomcat, just 
specify  /examples, you need not sepcify the full path of the application)
 
Then create workers.properties under $Apache_Home$/conf/  like this 
 
# In Unix, we use forward slashes:
ps=/
 
# list the workers by name
worker.list=ajp13
 
#
worker.ajp13.port=8009(ajp13 port from server.xml on tomcat machine)
worker.ajp13.host=hostname(Machine B)
worker.ajp13.type=ajp13

(no need to define tomcat_home and java_home parameters here, you define them on 
catalina.sh on tomcat machine)
 
this is all you need to do on apache machine.......

server.xml changes on  Machine B(tomcat machine)
—------------------------------------------------------
 
Set the required environment variables JAVA_HOME AND CATALINA_HOME in 
$TOMCAT_HOME$/bin/catalina.sh
 
Commen out the Standalone HTTP port(port 8080) Connector. 
 
<!--
    <Connector className="org.apache.catalina.connector.http.HttpConnector"
               port="8080" minProcessors="5" maxProcessors="75"
               enableLookups="true" redirectPort="8443"
               acceptCount="10" debug="0" connectionTimeout="60000"/>
-->    

 
Also Comment out the WARP connector 
 
  <Service name="Tomcat-Apache">
<!--
    <Connector className="org.apache.catalina.connector.warp.WarpConnector"
     port="8008" minProcessors="5" maxProcessors="75"
     enableLookups="true" appBase="webapps"
     acceptCount="10" debug="0"/>
-->

 
Change the both the <Engine> Tag and <Host> tag defaultHost to tomcat hostName(ex: 
tomcat.apache.com) 
(This should match with your workers.properties host name.)
 
<Engine name="Standalone" defaultHost="tomcat.apache.com" debug="0">
  <Host name="tomcat.apache.com" debug="0" appBase="webapps" unpackWARs="true">
  </Host>
</Engine>
 
start tomcat and apache, you should be able to access examples from apache machine....
 
I have pretty much followed the http://www.ubeans.com/tomcat/ documentation......many 
many thanks to Pascal Forget.
 
 
Let me know, how it goes...............
 
-Raj


>>> [EMAIL PROTECTED] 10/23/02 11:11AM >>>
All,

I am setting up a config where Apache and Tomcat are on different hosts. In
the Jakarta documentation, the worker.properties example describes the setup
for Apache and Tomcat on the same host. I have read John Turner's excellent
web page which also describes the setup for Apache and Tomcat on the same
host.

To configure the Apache workers.properties file to communicate with Tomcat
on different hosts, what are the crucial directives ?  I know it will be
something like this to connect with one host:

worker.list=ajp13
worker.ajp13.host="name of host with Tomcat"
worker.ajp13.type=ajp13

How do you configure to talk with multiple hosts ?


Thanks




--
To unsubscribe, e-mail:   <mailto:tomcat-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-user-help@;jakarta.apache.org>

Reply via email to