I got it working! It wasn't quite the JkMount lines but it was indeed an
Apache config error. After moving a portion of the autogenerated conf file
to the main Apache conf I found that the VirtualHost portion wasn't working
for whatever reason (I'm no Apache guru). Commenting it out immediately
fixed the problem. The tail end of my Apache conf file now looks like this:
[begin]
#Include /usr/local/tomcat/conf/auto/mod_jk.conf
<IfModule !mod_jk.c>
LoadModule jk_module libexec/mod_jk.so
</IfModule>
JkWorkersFile "/usr/local/tomcat/conf/jk/workers.properties"
JkLogFile "/usr/local/tomcat/logs/mod_jk.log"
JkLogLevel emerg
#<VirtualHost localhost>
#ServerName localhost
#################### localhost:/examples ####################
# Static files
Alias /examples "/usr/local/tomcat/webapps/examples"
<Directory "/usr/local/tomcat/webapps/examples">
Options Indexes FollowSymLinks
DirectoryIndex index.html index.htm index.jsp
</Directory>
# Deny direct access to WEB-INF and META-INF
#
<Location "/examples/WEB-INF/*">
AllowOverride None
deny from all
</Location>
<Location "/examples/META-INF/*">
AllowOverride None
deny from all
</Location>
#JkMount /examples ajp13
#JkMount /examples/* ajp13
JkMount /examples/jsp/security/protected/j_security_check ajp13
JkMount /examples/snoop ajp13
JkMount /examples/servlet/* ajp13
JkMount /examples/CompressionTest ajp13
JkMount /examples/*.jsp ajp13
JkMount /examples/servletToJsp ajp13
JkMount /examples/SendMailServlet ajp13
#</VirtualHost>
[end]
JkMount /examples/* ajp13 -- worked just as well as the more explicit
definitions but with this you lose the advantages of using Apache as far as
I can tell. All content under /examples/ is served by Tomcat be it static
(.html, .jpg) or dynamic (servlets, jsps).
Thanks Milt & John for all the help. John: Maybe you can add something about
this to the troubleshooting section of your excellent page..
Regards,
Chetan Sarva
----- Original Message -----
From: "Milt Epstein" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Tuesday, August 20, 2002 1:53 PM
Subject: RE: Apache 1.3.20 + Tomcat + (mod_jk or mod_webapp) for SuSE 7.3
Linux?
> On Tue, 20 Aug 2002, Turner, John wrote:
>
> > The mod_jk.conf was posted...the directives are in there, just as they
> > should be. They are being auto-generated by tomcat.
>
> Oh, sorry. Hadn't followed the whole thread. And seems like there's
> another thread going with someone with similar problems/symptoms, so I
> may have been getting them crossed.
>
> Still, at it's base, the problem is that Apache is not forwarding
> those URLs to Tomcat, and that all comes down to the Apache config
> (i.e. httpd.conf and any Included files). I think someone mentioned
> looking at where in the httpd.conf file the JK-related configuration
> directives are included, and I agree that could be a factor.
>
> Wait a sec, I just went to the archives, and picked up the mod_jk.conf
> that was posted. Here are the JkMount's related to "examples" that I
> found in there:
>
> JkMount /examples/jsp/security/protected/j_security_check ajp13
> JkMount /examples/snoop ajp13
> JkMount /examples/servlet/* ajp13
> JkMount /examples/CompressionTest ajp13
> JkMount /examples/*.jsp ajp13
> JkMount /examples/servletToJsp ajp13
> JkMount /examples/SendMailServlet ajp13
>
> I was expecting to see:
>
> JkMount /examples ajp13
> JkMount /examples/* ajp13
>
> It looks like the two URIs he tried are:
>
> /examples/jsp/snp/snoop.jsp
> /examples/servlet/HelloWorldExample
>
> I don't see any JkMounts above that would cover the first URI. It
> does look like the third JkMount above should cover the second URI, so
> I'm not sure what's up with that.
>
> Anyway, I'm still not convinced that this isn't a JkMount problem.
> I'd suggest creating a conf file that includes the following two
> JkMount directives:
>
> JkMount /examples ajp13
> JkMount /examples/* ajp13
>
> as well as whatever other JK-related directives are essential
> (e.g. loading the module, and specifying the location of the
> workers.properties file and the log), Include'ing that file in
> httpd.conf (there's nothing that says you need to use the
> auto-generated one, you know), restarting things, and giving it
> another try.
>
>
> > -----Original Message-----
> > From: Milt Epstein [mailto:[EMAIL PROTECTED]]
> > Sent: Tuesday, August 20, 2002 1:11 PM
> > To: Tomcat Users List
> > Subject: Re: Apache 1.3.20 + Tomcat + (mod_jk or mod_webapp) for SuSE
> > 7.3 Linux?
> >
> >
> > On Tue, 20 Aug 2002, Chetan Sarva wrote:
> >
> > > >
> > > > Looks fine to me.
> > > >
> > > > The only other things I can suggest are:
> > > >
> > > > 1. it's something going on with apache 1.3.20 (unlikely) or is the
".20"
> > a
> > > > typo and you are using ".26"?
> > >
> > > I am indeed using 1.3.26 (the subject line is left from the original
> > post).
> > >
> > > > 2. what are the contents of mod_jk.log when you ask for
> > > > http://localhost/examples/servlet/HelloWorldExample ?
> > >
> > > mod_jk.log is 0 bytes. Apache's error_log comes up with more 404s:
> > > [Tue Aug 20 11:55:35 2002] [error] [client 192.168.1.53] File does not
> > > exist: /usr/local/apache/htdocs/examples/jsp/snp/snoop.jsp
> > > [Tue Aug 20 11:55:50 2002] [error] [client 192.168.1.53] File does not
> > > exist: /usr/local/apache/htdocs/examples/servlet/HelloWorldExample
> > [ ... ]
> >
> > This means that Apache is not trying to forward that URL to Tomcat.
> > To me, this means you have a problem with your JkMount directives
> > (like that they don't exist :-). That is, you should have something
> > like this somewhere (perhaps via an Include) in your httpd.conf file:
> >
> > JkMount /examples ajp13
> > JkMount /examples/* ajp13
> >
>
> Milt Epstein
> Research Programmer
> Systems and Technology Services (STS)
> Campus Information Technologies and Educational Services (CITES)
> University of Illinois at Urbana-Champaign (UIUC)
> [EMAIL PROTECTED]
>
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>