Hello Melanie,

   I share André's vision :

#1 To get the root context http://www.robotronics.org/ forwarded to
Tomcat, the easiest way is to declare your java application as the
root context of your Tomcat (either naming it ROOT.war or declaring it
with path="" in server.xml according to your deployment method).

#1.1 If you cannot rename your tomcat app to serve Tomcat's root
context, look at context rewriting ; it would look like :

ProxyPass / http://my-tomcat:9080/Robotronics
ProxyPassReverse /Robotronics http://www.robotronics.org/


#2 You can mix the approach #1 to serve most of the
http://www.robotronics.org/ content including the root context with
Tomcat with serving sub parts of the web site directly from Apache
Httpd or from other servers.

ProxyPreserveHost On
ProxyPass /handle/in/httpd/rather/than/in/tomcat !
ProxyPass / http://my-tomcat:9080/

#3 Some people are afraid about performance cost of serving static
content from Tomcat rather than from Apache Httpd. For such problems,
I feel the solution resides more in the usage of standard HTTP caching
header Expires and Cache-Control combined with mod_expires and
mod_disk_cache rather than in copying static resources on Apache
Httpd.

#4 I slightly disagree with André on asking Tomcat to listen on port
80 ; I am very reluctant to this approach as it requires to run the
JVM as root ; I prefer the iptables approach (well described in the in
the rimuhosting doc you referred - 1).

Hope this helps,

Cyrille

1) http://rimuhosting.com/mod_jk2_and_mod_proxy_ajp.jsp#iptables
--
clecl...@xebia.fr
http://blog.xebia.fr


On Mon, Mar 15, 2010 at 11:37 AM, André Warnier <a...@ice-sa.com> wrote:
>
> Melanie wrote:
>>
>> Thanks Cyrille for the information. This looks like it's a quick fix but
>> there is still another issue.
>>
>> The Tomcat Startup Page is now being served, but not the actual springapp
>> J2EE web application that is located in the Tomcat directory --->
>> /usr/java/tomcat-5.5/webapps/springapp
>>
>> Do you know the way to bring up the actual J2EE webpage instead of the
>> Tomcat Startup Page when the URL
>> http://www.robotronics.org is served by Apache and Tomcat?
>>
> Melanie,
>
> backing up a little bit..
>
> According to your various posts, originally, you have, on the same host :
>
> - an Apache httpd, answering on http://www.robotronics.org (port 80), which 
> serves html and javascript documents
> - a Tomcat engine and an application in it, answering on 
> http://www.robotronics.org:9080/Robotronics (thus port 9080, and a URI 
> "/Robotronics"), but this application is located in the directory 
> /usr/java/tomcat-5.5/webapps/springapp.
>
> and you would apparently like that "everything" would answer to the URL
> http://www.robotronics.org (port 80).
>
> That is feasible, but the above is composed of several parts, and there are 
> several ways to configure the individual parts.
> So you have to be a bit systematic in the approach, and do one thing at a 
> time.
>
> A couple of questions to answer first are :
> 1) do you want to leave the html and javascript part under the Apache httpd 
> server, or not ?
> 2) do you need this Apache httpd server for other things, apart from this 
> specific case ?
>
> The reason for these questions is that the easiest and simplest setup would be
> - to move the html and javascript part onto the Tomcat server
> - to eliminate the Apache httpd server
> - to change the Tomcat server so that it responds to port 80 instead of port 
> 9080
> - to change the Tomcat configuration so that your webapp application becomes 
> the "default" application of Tomcat, and thus answers to the URL
> http://www.robotronics.org, without the "/Robotronics" prefix.
>
> But, this simple setup would not be the right one if you want to keep the 
> front-end Apache httpd, because for example you need it for other things 
> (other virtual sites, other applications, etc..).
> In that case, we would then recommend some form of "proxying" between Apache 
> httpd and Tomcat.  And there are several possibilities there too.
> Which is why I mention the need to take this one bit at a time..
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to