tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Turner, John" <JTur...@AAS.com>
Subject RE: Serving files from the Apache docroot
Date Mon, 27 Jan 2003 15:03:50 GMT

Neither JK or JK2 get involved with a request unless the request matches a
mapping.  I don't know what you mean by "send back requests".  If you're
using Apache, ALL requests come in on port 80, and it's up to Apache to
decide if the request should go to Tomcat or be handled directly.

There's no need to mirror content in two directories, nor is there any need
to point Tomcat at Apache's content root.  You can just make Apache's doc
root the same as Tomcat's Context root and the issue goes away.  Or, just
put your JSP and servlets in Tomcat's doc root and leave it like that.  If
you have Apache serving static content like images, those images don't have
to be in your web application's root at all if you don't want them to be.

Example:

http://some.host.com/images/myimage.gif (Apache doc root
/usr/local/apache/htdocs/images, never goes to Tomcat)
http://some.host.com/my.jsp (Tomcat Context /jsp because of URL mapping of
"/*.jsp")

John


> -----Original Message-----
> From: Henning Heil [mailto:henning.heil@dl.deutsche-leasing.de]
> Sent: Monday, January 27, 2003 9:51 AM
> To: Tomcat Users List
> Subject: Re: Serving files from the Apache docroot
> 
> 
> Hi Peter,
> 
> I had and have the same problem - and didn't find a solution 
> yet. A more 
> or less good workaround I discussed with (or better was a 
> suggestion by) 
> Mike Bachrynowski (who is also member on the list) could be to 
> completely mirror the apache docroot to the tomcat docroot. 
> This in my 
> eyes is 'a little' waste of disk space and an alternative I 
> though about 
> is, to set the tomcat docroot to the same local dir the 
> apache's points 
> to - but I haven't tested this, maybe causes bad bad problems.
> 
> As far as I understood the mayor cause for all this is, that jk2 
> developers due to performance reasons don' t want to send 
> back requests 
> (for images, .js, .css ...) to the apache and - what you and 
> Mike and I 
> want to do becomes impossible. <-- LIST: is this right (I'm 
> not really 
> sure whether I should believe it)?
> 
> What I'm asking myself: is there anybody on the list who is really 
> highly experienced in jk2 coniguration?
> 
> Well, over all, hope this helps a bit,
> 
> Henning
> 
> 
> 
> Peter Flynn wrote:
> 
> > I just brought up Tomcat in order to serve a handful of .jsp files
> > which are in the Apache document root.
> >
> > Right now of course, when Apache hands off the request to Tomcat
> > for /foo.jsp, Tomcat comes back with a 404 because it can't find
> > the file:
> >
> > > HTTP Status 404 - /foo.jsp
> > >
> > > type Status report
> > >
> > > message /foo.jsp
> > >
> > > description The requested resource (/foo.jsp) is not available.
> > > Apache Tomcat/4.1.18
> >
> > Where do I tell Tomcat to look for this file in (eg) /var/www/html?
> > Where is it currently looking?
> >
> > ///Peter
> >
> >
> > -- 
> > To unsubscribe, e-mail: 
> > <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
> > For additional commands, e-mail: 
> > <mailto:tomcat-user-help@jakarta.apache.org>
> >
> >
> 
> 
> --
> To unsubscribe, e-mail:   
<mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail:
<mailto:tomcat-user-help@jakarta.apache.org>

--
To unsubscribe, e-mail:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-user-help@jakarta.apache.org>


Mime
View raw message