Can you state what needs to be implemented on machine1 and machine2, I have posted another query the contents of which I have pasted below:-
I am trying to configure two separate machines one with Tomcat 3.2.1 and another with apache with mod_jk
The config is as follows:-
Machine1:
----------
Tomcat 3.2.1 + mod_jk
workers.properties
worker.ajp13.port=8009
worker.ajp13.host=localhost
worker.ajp13.type=ajp13
JkMount
server.xml contains the standard configuration
with Context of
<Context path="/myapp"
docBase="/packages/apps/myapp" />
Machine2
----------
Apache is setup to load mod_jk
This machine also has tomcat loaded
The workers.properties file on Machine2 has the following entry
worker.ajp13.port=8009
worker.ajp13.host=machine1
worker.ajp13.type=ajp13
Then I add the following mount points
JkMount /myapp/servlet/* ajp13
JkMount /myapp/*.jsp ajp13
I then startup Tomcat on Machine1 followed by apache on Machine2
When I then type on http://www.myhost.com/myapp/myjsp.jsp
I don't get my application just a message saying 404 not found.
I have tried telnet machine1 8009 but nothing is returned...
Regards
Kumar
"David Cassidy (Programmer)" wrote:
Yup this is possible ....
and if you are using the loadbalancing module ( so you can have more
than 1
tomcat for your apache(s) to talk to) essentialin workers.properties you should find something like ...
worker.ajp12.port=8007
worker.ajp12.host=localhost
worker.ajp12.type=ajp12
worker.ajp12.lbfactor=1To define another service try ...
worker.external_1.port=8007
worker.external_1.host=192.168.34.43
worker.external_1.type=ajp12
worker.external_1.lbfactor=1You can define as many of these as you want.
You can then define a loadbalancer ( if you want to)
worker.loadbalancer.type=lb
worker.loadbalancer.balanced_workers=ajp12, external_1, external_2 etcthen
worker.list=loadbalancer
and you have got load balancingIf you just want to use a single tomcat host then
worker.list=external_1in your mod_jk.conf
JkMount /test/* loadbalancer
or
JkMount /test/* external_1
Hope this helps
David
PS If you are going to do loadbalancing I suggest you use ajp12
it takes less time to recover if than ajp13
Kumar Vijayaratnam wrote:
>
> Michael,
>
> Did you ever get an answer to this question.. I also posted a similar
> question but have never received an answer.
>
> Regards
> Kumar
>
> Wolle wrote:
>
> > Hello all,
> > Is it possible to use Apache with mod_jk to a extrenal Tomcat ?
> > I have found something like this for the mod_jserv (to insert in the
> > httpd.conf)
> > ApJServMount /examples ajpv12://hostname:port/root
> >
> > Is it also with mod_jk ?
> >
> > JkMount /test/* ajp12://test.domain.com:8007/root
> > and
> > JkMount /test/* ajp13://test.domain.com:8009/root
> >
> > ?
> >
> > Has someone tested this behavior ?
> >
> > Greetings,
> > Michael
