tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jan Labanowski <...@osc.edu>
Subject RE: Tomcat/Apache question
Date Sat, 29 Apr 2000 01:07:03 GMT
On Fri, 28 Apr 2000, Jonathan Coogan wrote:

> Yes I did include the tomcat.conf file in my httpd.conf file.  I am also
> able to run the servlets with Tomcat's server.  Unfortunately, this isn't
> going to do it for me - I really need to be able to use Apache for all
> static pages.  I only want to use Tomcat for servlets and JSPs.
> 
> Perhaps if someone posted a tomcat.conf file that works for them...
> 
> -Jon
> 

Try this...

        <IfModule mod_jserv.c>
                ApJServManual on
                ApJServDefaultProtocol ajpv12
                ApJServSecretKey DISABLED
                ApJServMountCopy on
                ApJServLogLevel notice
                ApJServDefaultPort 8007
                ApJServMount /examples /root

                AddType text/jsp .jsp
                AddHandler jserv-servlet .jsp
                <Location /examples/WEB-INF/ >
                        AllowOverride None
                        deny from all
                </Location>


        </IfModule>

=========
Make also sure that you have the /example context correctly mounted in
server.xml
=================

Why?

The Alias and <Directory> are the Apache directivers when Apache is
serving the pages. In this case, the only thing Apache has to know is
that when it sees the URL:

   http(s)://my.big.com/examples/something/something-else.html

it is supposed to pass the request to Tomcat, get back whatever Tomcat
returns, and pass it over to the client browser.

Put it simply: Apache SHOULD NOT KNOW where physically on the disk the
stuff is located. Only Tomcat should know this. 
Apache should know which URLs to pass to Tomcat, and it is the Tomcat
problem to find them on the disk and serve them back to Apache to
show it back to the browser.

Jan
jkl@osc.edu






















> -----Original Message-----
> From: Adam Le [mailto:adam@echobuzz.com]
> Sent: Friday, April 28, 2000 5:50 PM
> To: tomcat-user@jakarta.apache.org
> Subject: RE: Tomcat/Apache question
> 
> 
> Hi Jon,
> 
> Did you append "include <tomcat home>/conf/tomcat.conf to your apache
> httpd.conf file?  If not, Apache does not know where Tomcat is.  Also, if
> you run Tomcat, can you browse http://localhost:8080/ ?  This is Tomcat's
> built-in http server.  You should be about to run all of your examples
> there.
> 
> Adam
> 
> -----Original Message-----
> From: Jonathan Coogan [mailto:JonathCo@Attachmate.com]
> Sent: Friday, April 28, 2000 5:38 PM
> To: 'tomcat-user@jakarta.apache.org'
> Subject: Tomcat/Apache question
> 
> 
> Hello.
> 
> I am trying to get Tomcat working with Apache and I'm having some problems.
> I'm using Redhat Linux 6.2, Apache 1.3.12, Tomcat 3.1, and IBM's JDK118.
> All I want to do is get the Servlets and JSPs in the
> $TOMCAT_HOME/webapps/examples directory to work.  Right now I can get the
> JSP examples to work, but none of the servlets work - I just get 404 errors.
> This is what I have in my tomcat.conf file:
> 
> 	<IfModule mod_jserv.c>
> 		ApJServManual on
> 		ApJServDefaultProtocol ajpv12
> 		ApJServSecretKey DISABLED
> 		ApJServMountCopy on
> 		ApJServLogLevel notice
> 		ApJServDefaultPort 8007
> 
> 		AddType text/jsp .jsp
> 		AddHandler jserv-servlet .jsp
> 		Alias /examples /usr/jakarta-tomcat/webapps/examples
> 		<Directory "/usr/jakarta-tomcat/webapps/examples">
> 			Options Indexes FollowSymLinks
> 		</Directory>
> 		<Location /examples/WEB-INF/ >
> 			AllowOverride None
> 			deny from all
> 		</Location>
> 
> 		ApJServMount /examples/servlet /examples
> 
> 	</IfModule>
> 
> The 404 responses are coming from Apache, not the Tomcat server.  They also
> show up in my apache error log.  It almost seems as though the ApJServMount
> command isn't even being executed.  Requests for servlets are not being
> forwarded to Tomcat.
> 
> Can somebody please help me out here?  Thanks.
> 
> -Jon Coogan
> 
> --------------------------------------------------------------------------
> To unsubscribe, email: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commmands, email: tomcat-user-help@jakarta.apache.org
> 
> 
> 
> --------------------------------------------------------------------------
> To unsubscribe, email: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commmands, email: tomcat-user-help@jakarta.apache.org
> 
> --------------------------------------------------------------------------
> To unsubscribe, email: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commmands, email: tomcat-user-help@jakarta.apache.org
> 

Jan K. Labanowski            |    phone: 614-292-9279,  FAX: 614-292-7168
Ohio Supercomputer Center    |    Internet: jkl@osc.edu 
1224 Kinnear Rd,             |    http://www.ccl.net/chemistry.html
Columbus, OH 43212-1163      |    http://www.osc.edu/


Mime
View raw message