Hi, 
Looks like I found out the solution myself :).
To serve static pages via apache instead of tomcat, all I have
to do is set the attribute forwardAll="false" for
ApacheConfig listener in server.xml.

    <Listener className="org.apache.ajp.tomcat4.config.ApacheConfig"
forwardAll="false"/>

Since the flag is set to true by default and my server.xml configuration did
not include this attribute, all the pages(static as well as dynamic) were
served
by tomcat in the tomcat-apache service mode.

thanks
Paresh Deshpande

( Hey Scott, once again thanks for your workaround suggestion. )

-----Original Message-----
From: Paresh Deshpande [mailto:[EMAIL PROTECTED]]
Sent: Monday, May 20, 2002 08:47 PM
To: [EMAIL PROTECTED]
Subject: unable to serve static pages through apache web server (Tomcat
4.0 - Apache using AJP connector)


Hello,
    I have installed Apache web server (Apache/1.3.24 (Win32) mod_jk/1.1.0)
with
Tomcat as servlet engine (Apache Tomcat/4.0.3) to serve my application. 
I am using AJP connector to integrate tomcat with apache installation.
        Now regarding my problem, all my requests for static content (gifs,
html files) 
as well as for servlets in webapp folder end up getting served 
by tomcat (i.e. when I type url http://localhost:8090/app1/test.html ,
where localhost:8090 stands for apache web server and app1 for the webapp
folder for app1, 
I see test.html which is served by tomcat). 
Is it possible for apache web server to load static pages and for tomcat to
serve only 
the servlets? 
        Reason I want to load static pages via apache is that tomcat is case
sensitive even for
the static pages. If I type http://localhost:8090/app1/test.HTml , I get
page not found error
(and the error is served by tomcat). And in earlier versions of
apache/tomcat setup,
the static pages were served by apache instead of tomcat. Question is how
can the page now be 
loaded via apache web server? Is there a way of configuring apache to serve
static pages 
even in app1 folder / application?  Or do I need to make any correction to
my configuration?

regards
Paresh

Plaese find attached :

                        1 server.xml
                        2 httpd.conf
                        3 auto generated mod_jk.conf

server.xml configuration is as follows:
****************************************
<Server port="8005" shutdown="SHUTDOWN" debug="0">

  <Service name="Tomcat-Apache">

    <Connector className="org.apache.ajp.tomcat4.Ajp13Connector"
               port="8009" minProcessors="5" maxProcessors="75"
               acceptCount="10" debug="0"/>

    <Engine className="org.apache.catalina.core.StandardEngine"
     name="localhost" appBase="c:/program files/APPBASE/" debug="4">

      <Host name="localhost" debug="4" appBase="c:/program files/APPBASE/"
unpackWARs="false">

          <Listener className="org.apache.ajp.tomcat4.config.ApacheConfig"
/>

          <Context path="/app1" docBase="c:/program files/APPBASE/app1"
debug="4" reloadable="true"/>

      </Host>

      <Realm className="org.apache.catalina.realm.MemoryRealm" />

    </Engine>

  </Service>

</Server>
***************************************

AJP Connector related data in httpd.conf configuration is as follows :

##
##
ServerName localhost
##
##

##
##
##
Port 8090
##
##
##

Alias /app1 "c:/program files/APPBASE/app1/"
AliasMatch ^/[Aa][Pp][Pp][1]/(.*) "c:/program files/APPBASE/app1/"

## AJP CONFIGURATION END

LoadModule jk_module libexec/mod_jk.dll

# Configure mod_jk

JkWorkersFile "C:/Program Files/Apache Tomcat
4.0/conf/jk/workers.properties"
JkLogFile "C:/Program Files/Apache Tomcat 4.0/logs/mod_jk.log"
JkLogLevel debug

JkMount /servlet/* ajp13
JkMount /app1/servlet/com.trivium.cis.* ajp13

Include "C:/Program Files/Apache Tomcat 4.0/conf/auto/mod_jk.conf"

## AJP CONFIGURATION END
****************************************

Here is auto generated mod_jk.conf file :

*************************
<VirtualHost localhost>
    ServerName localhost

    JkMount /app1 ajp13
    JkMount /app1/* ajp13
</VirtualHost>

**************************************

--
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]>

Reply via email to