You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Craig Anderson <cr...@netstatresources.com> on 2000/08/10 23:08:36 UTC

Tomcat + Apache Across Multiple Machines

Hello -

	I currently have two machines set up to do all of my java/internet
work. The first is running Solaris 6 and apache 1.3.12 with mod_jserv and is
set up to handle about 30 virtual hosts. The second is running Solaris 7,
tomcat 3.1, and postgres 7.0.2. I want the second box to handle all servlet
and jsp files for the first. I have an nfs link set up between the two and I
can put all of the jsp's and servlets onto the box running tomcat and put
them where they need to be. However, here is how I would like it all to
work, and I used to be able to do this with gnujsp:

	All php, html, perl and other files will get served off of the
apache box. Then I would like to set up apache to send all jsp requests to
the tomcat server so this would happen:

	http://server.domain.com/index.html is located on the apache box and
gets served by apache.
	http://server.domain.com/index.jsp is located on the tomcat box and
when the apache box gets a request for this file it hands the request off to
the tomcat box in typical mod_jserv fashion. 

	I set up a context like this:
	<Context path="/" docBase="vhosts/devel/docroot" debug="0"
reloadable="true" ></Context>

	So, under this scenario, index.jsp would be located on the tomcat
box under vhosts/devel/docroot/index.jsp. The problem is, I cannot figure
out how to set up the vhost entry on apache to just hand off all jsp files
to the tomcat box. Anyone do anything like this? Any tips? The documentation
seems to still be a bit scarce. 

Craig Anderson
Director of Internet Services
Netstat Resources, LLC.


Re: Tomcat + Apache Across Multiple Machines

Posted by Markus Colombo <ma...@customercare.ch>.
Hi

You need to direct all servlet requests to your tomcat box with something like:

#the following line is used, when tomcat runs on another machine...
ApJServMount /servlet ajpv12://tomcat_Box/root

HTH

Markus Colombo

Craig Anderson wrote:

> Hello -
>
>         I currently have two machines set up to do all of my java/internet
> work. The first is running Solaris 6 and apache 1.3.12 with mod_jserv and is
> set up to handle about 30 virtual hosts. The second is running Solaris 7,
> tomcat 3.1, and postgres 7.0.2. I want the second box to handle all servlet
> and jsp files for the first. I have an nfs link set up between the two and I
> can put all of the jsp's and servlets onto the box running tomcat and put
> them where they need to be. However, here is how I would like it all to
> work, and I used to be able to do this with gnujsp:
>
>         All php, html, perl and other files will get served off of the
> apache box. Then I would like to set up apache to send all jsp requests to
> the tomcat server so this would happen:
>
>         http://server.domain.com/index.html is located on the apache box and
> gets served by apache.
>         http://server.domain.com/index.jsp is located on the tomcat box and
> when the apache box gets a request for this file it hands the request off to
> the tomcat box in typical mod_jserv fashion.
>
>         I set up a context like this:
>         <Context path="/" docBase="vhosts/devel/docroot" debug="0"
> reloadable="true" ></Context>
>
>         So, under this scenario, index.jsp would be located on the tomcat
> box under vhosts/devel/docroot/index.jsp. The problem is, I cannot figure
> out how to set up the vhost entry on apache to just hand off all jsp files
> to the tomcat box. Anyone do anything like this? Any tips? The documentation
> seems to still be a bit scarce.
>
> Craig Anderson
> Director of Internet Services
> Netstat Resources, LLC.