I would leave your httpd.conf file the same as  you have it shown below.  I would also 
confirm in you logs that everything is working ok.  However, Apache should not even 
startup if the included configuration file, mod_jk.conf is not present.  

------------------------------
httpd.conf (on Web Server)
------------------------------
LoadModule jk_module modules/mod_jk.so
ServerName xyz.com

Include conf/mod_jk.conf

JkWorkersFile "conf/workers.properties"
JkLogFile "logs/mod_jk.log"

JkLogLevel debug

JkMount /examples ajp13
JkMount /examples/* ajp13


The trick here is to make some changes to your workers.properties in order to connect 
to another box.
It looks as if your are trying to configure a load balancer.  If you are connecting to 
only one instance 
of tomcat this is not necessary.  Also you need to look in your server.xml and see 
that you have the coyote connector 
running on port 8009.  I would exclude the line: worker.ajp13.lbfactor=5 from this 
configuration.  Besides, you have not defined
a worker for load balancer, so i believe this line is not necessary.  
I would probably write your workers.properties files the following way:

------------------------------------
workers.properties (on Web Server)
------------------------------------

workers.CATALINA_HOME=/usr/local/tomcat4
workers.java_home=$(JAVA_HOME)
ps=/

worker.list=ajp13
worker.ajp13.port=8009
worker.ajp13.host=101.102.103.104
#above is IP address of abc.com
worker.ajp13.type=ajp13
#Remove the following line.
#worker.ajp13.lbfactor=5



I am going to send you my workers.properties for reference.  IF AND ONLY IF you do 
configure a load balancer, then make sure in your server.xml to 
change following line from:
 <Engine name="Standalone" defaultHost="localhost" debug="0">

to

 <Engine name="Standalone" defaultHost="localhost" debug="0" jvmRoute="worker2" >
This is necessary for load balancing.  The value of jvmRoute should be equal to the 
worker that you want to connect to that particular instance of tomcat.  


#*****Begin worker.properties*****
#
worker.worker2.type=ajp13
worker.worker1.type=ajp13
#
#Specifies the load balance factor when used with a load balancing worker.
#Note:
#-----> lbfactor must be > 0
#-----> Low lbfactor means less work done by the worker.
#
worker.worker1.lbfactor=1
worker.worker2.lbfactor=10
#
#Specify the size of the open connection cache.
#worker.ajp13.cachesize
#
#------DEFAULT LOAD BALANCER WORKER DEFINITION-----------
#
#The loadbalancer (type lb) worker perform weighted round-robin
#load balancing with sticky sessions.
#Note:
#---> If a worker dies, the load balancer will check its state once
#in a while. Until then all work is redirected to peer worker.
#
worker.loadbalancer.type=lb
worker.loadbalancer.balanced_workers=worker2,worker1
#
#worker.tomcat_home should point to the location where you installed
#tomcat. This is where you have your conf, webapps and lib directories.
#Note: Please make sure to enter the appropriate path from your machine.
#
worker.tomcat_home=/usr/local/tomcat
#
#worker.java_home should point to your Java installation.
#Normally you should have a bin and lib directories beneath it.
#Note: Please make sure to enter the appropriate path from your machine.
#
worker.java_home=/usr/local/java
#
#You should configure your environment slash...ps=\on NT and / on UNIX
#and may be different elsewhere.
#
ps=/
#-------ADVANCED MODE-------
#------------------------------
#
#
#-------DEFAULT worker list------
#----------------------------------
#
#The worker that your plugins should create and work with
#
worker.list=worker2,loadbalancer, worker1
#
#----DEFAULT ajp13 WORKER DEFINITION-----
#
#Defining a worker named ajp13 and of type ajp13
#Note that the name and the type do not have to match.
#
worker.worker2.port=8009
worker.worker2.host=localhost
worker.worker2.cachesize=100
worker.worker2.cache_timeout=1000
worker.worker2.socket_keepalive=3
worker.worker2.socket_timeout=1000

worker.worker1.port=8019
worker.worker1.host=216.222.102.252
worker.worker1.cachesize=100
worker.worker1.cache_timeout=1000
worker.worker1.socket_keepalive=3
worker.worker1.socket_timeout=1000

#
#*****End worker.properties*****








------------------------------------
workers.properties (on Web Server)
------------------------------------

workers.CATALINA_HOME=/usr/local/tomcat4
workers.java_home=$(JAVA_HOME)
ps=/

worker.list=ajp13
worker.ajp13.port=8009
worker.ajp13.host=101.102.103.104
#above is IP address of abc.com
worker.ajp13.type=ajp13
worker.ajp13.lbfactor=5



-----Original Message-----
From: Hari Om [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 23, 2004 7:58 AM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Apache+Tomcat + MOD_JK on different machine 


SUBJECT: Apache+Tomcat + MOD_JK on different machine

I am using Apache 2.0.47 and Tomcat 4.1.27 on my SuSE Linux. I had 
configured my mod_jk and it works just great! (My Web and App Server were on 
same box)

Now I have a Web Server and App Server on a different box and was wondering 
what changes do I have to make to "MOD_JK" for the Integration to work.

My old settings were:
----------
httpd.conf
----------
LoadModule jk_module modules/mod_jk.so
ServerName abc.com

Include /usr/local/tomcat4/conf/auto/mod_jk.conf

JkWorkersFile "/usr/local/apa2047/conf/workers.properties"
JkLogFile "/usr/local/apa2047/logs/mod_jk.log"

JkLogLevel debug

JkMount /examples ajp13
JkMount /examples/* ajp13

--------------------
workers.properties
--------------------

workers.CATALINA_HOME=/usr/local/tomcat4
workers.java_home=$(JAVA_HOME)
ps=/

worker.list=ajp13
worker.ajp13.port=8009
worker.ajp13.host=101.102.103.104
#above is IP address of abc.com
worker.ajp13.type=ajp13
worker.ajp13.lbfactor=5


Now that I have both APACHE and TOMCAT on DIFFERENT Boxes, I was wondering 
what changes do I have to make for the above to work.

My Web Server is "xyz.com" and my App Server is "abc.com". I have mod_jk 
configured in my Web Server.

My new HTTPD.CONF file is:
My NEW settings are:
------------------------------
httpd.conf (on Web Server)
------------------------------
LoadModule jk_module modules/mod_jk.so
ServerName xyz.com

Include conf/mod_jk.conf

JkWorkersFile "conf/workers.properties"
JkLogFile "logs/mod_jk.log"

JkLogLevel debug

JkMount /examples ajp13
JkMount /examples/* ajp13

------------------------------------
workers.properties (on Web Server)
------------------------------------

workers.CATALINA_HOME=/usr/local/tomcat4
workers.java_home=$(JAVA_HOME)
ps=/

worker.list=ajp13
worker.ajp13.port=8009
worker.ajp13.host=101.102.103.104
#above is IP address of abc.com
worker.ajp13.type=ajp13
worker.ajp13.lbfactor=5

_________________________________________________________________
Is your PC infected? Get a FREE online computer virus scan from McAfee� 
Security. http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to