You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Ada <su...@try.gov.hk> on 2001/11/09 08:34:32 UTC

tomcat and apache on separate machine

Hi all,

I need help to setup tomcat 3.2.2. and apache1.3.20 on separate
machine!!

I have done the following steps to move the apache to a new machine.
1. move file mod_jk.conf-customized to new machine.
2. move file workers.properties to new machine.
3. modify httpd.conf in the new machine to point to file
mod_jk.conf-customized.
4. modify mod_jk.conf-customized to point the file worker.properties.
5. modify workers.properties, change the value of
worker.remotetomcat.host to the ip of tomcat machine.
6. I suppose there is no changes required for server.xml in tomcat
machine.

When I tried to access URL http://apachehost/examples/servlets, I got
error message 404.  It seems that it was trying to access the directory
in the apache machine.

Anything  I am missing?


mod_jk.conf-customized
=================
LoadModule jk_module modules/mod_jk.dll

JkWorkersFile "d:/apache/conf/workers.properties"
JkLogFile "d:/apache/logs/mod_jk.log"
JkLogLevel error
JkMount /*.jsp ajp12
JkMount /servlet/* ajp12

#########################################################
# Auto configuration for the /examples context starts.
#########################################################

#
# The following line makes apache aware of the location of the /examples

context
#
Alias /examples "d:/tomcat/webapps/examples"
<Directory "d:/tomcat/webapps/examples">
    Options Indexes FollowSymLinks
</Directory>

#
# The following line mounts all JSP files and the /servlet/ uri to
tomcat
#
JkMount /examples/servlet/* ajp13
JkMount /examples/*.jsp ajp13

workers.properties
=============
worker.list=ajp12, ajp13
worker.ajp12.port=8007
worker.ajp12.host=xx.xx.xxx.xx   <- ip of tomcat machine
worker.ajp12.type=ajp12
worker.ajp12.lbfactor=1

worker.ajp13.port=8009
worker.ajp13.host=xx.xx.xxx.xx  <- ip of tomcat machine
worker.ajp13.type=ajp13
worker.ajp13.lbfactor=1

Ada.



--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>


Re: tomcat and apache on separate machine

Posted by Mika Goeckel <mi...@stepstone.de>.
Another approach would be to use mod_proxy:

LoadModule proxy_module       /usr/lib/apache/libproxy.so
[...]
AddModule mod_proxy.c
[...]
ProxyRequests On
ProxyPass /yourtomcatdir/ http://your-other-machine
ProxyPassReverse /yourtomcatdir/ http://your-other-machine

cheers, Mika

----- Original Message ----- 
From: "Ada" <su...@try.gov.hk>
To: <to...@jakarta.apache.org>
Sent: Friday, November 09, 2001 8:34 AM
Subject: tomcat and apache on separate machine


> Hi all,
> 
> I need help to setup tomcat 3.2.2. and apache1.3.20 on separate
> machine!!
> 
> I have done the following steps to move the apache to a new machine.
> 1. move file mod_jk.conf-customized to new machine.
> 2. move file workers.properties to new machine.
> 3. modify httpd.conf in the new machine to point to file
> mod_jk.conf-customized.
> 4. modify mod_jk.conf-customized to point the file worker.properties.
> 5. modify workers.properties, change the value of
> worker.remotetomcat.host to the ip of tomcat machine.
> 6. I suppose there is no changes required for server.xml in tomcat
> machine.
> 
> When I tried to access URL http://apachehost/examples/servlets, I got
> error message 404.  It seems that it was trying to access the directory
> in the apache machine.
> 
> Anything  I am missing?
> 
> 
> mod_jk.conf-customized
> =================
> LoadModule jk_module modules/mod_jk.dll
> 
> JkWorkersFile "d:/apache/conf/workers.properties"
> JkLogFile "d:/apache/logs/mod_jk.log"
> JkLogLevel error
> JkMount /*.jsp ajp12
> JkMount /servlet/* ajp12
> 
> #########################################################
> # Auto configuration for the /examples context starts.
> #########################################################
> 
> #
> # The following line makes apache aware of the location of the /examples
> 
> context
> #
> Alias /examples "d:/tomcat/webapps/examples"
> <Directory "d:/tomcat/webapps/examples">
>     Options Indexes FollowSymLinks
> </Directory>
> 
> #
> # The following line mounts all JSP files and the /servlet/ uri to
> tomcat
> #
> JkMount /examples/servlet/* ajp13
> JkMount /examples/*.jsp ajp13
> 
> workers.properties
> =============
> worker.list=ajp12, ajp13
> worker.ajp12.port=8007
> worker.ajp12.host=xx.xx.xxx.xx   <- ip of tomcat machine
> worker.ajp12.type=ajp12
> worker.ajp12.lbfactor=1
> 
> worker.ajp13.port=8009
> worker.ajp13.host=xx.xx.xxx.xx  <- ip of tomcat machine
> worker.ajp13.type=ajp13
> worker.ajp13.lbfactor=1
> 
> Ada.
> 
> 
> 
> --
> To unsubscribe:   <ma...@jakarta.apache.org>
> For additional commands: <ma...@jakarta.apache.org>
> Troubles with the list: <ma...@jakarta.apache.org>
> 


--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>