tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Anthony Milbourne <anthony.milbou...@becta.org.uk>
Subject RE: Url Mapping with mod_jk
Date Mon, 09 Sep 2002 10:48:45 GMT
Hi Again

Thanks for your ongoing help.

I have done as suggested in the previous post i.e.. http.conf now just has
an include & all listener elements in server.xml have forwardAll="false" in
them.  The result (as I'm sure you know) of changing the listener elements
was to make the generated mod_jk.conf much more comprehensive (and similar
to the example you pointed at).

This is all good and I feel I am making progress - but the problem is still
there.  When I look at the site through Apache the JSP source is displayed.

Also, I have noticed that the generated mod_jk.conf contains two identical
entries for the same virtual host.

I have included the mod_jk.conf below (sorry it is so long):

--- cut ---

########## Auto generated on Mon Sep 09 10:52:32 BST 2002##########

<IfModule !mod_jk.c>
  LoadModule jk_module /usr/local/apache/libexec/mod_jk.so
</IfModule>

JkWorkersFile "/usr/local/jakarta-tomcat/conf/jk/workers.properties"
JkLogFile "/usr/local/jakarta-tomcat/logs/mod_jk.log"

JkLogLevel info

<VirtualHost stagenewngfl.ngfl.gov.uk>
    ServerName stagenewngfl.ngfl.gov.uk

    #################### stagenewngfl.ngfl.gov.uk:/stagenewngfl
####################

    # Static files 
    Alias /stagenewngfl
"/usr/local/jakarta-tomcat-4.0.4/webapps/stagenewngfl"

    <Directory "/usr/local/jakarta-tomcat-4.0.4/webapps/stagenewngfl">
        Options Indexes FollowSymLinks
        DirectoryIndex index.jsp 
    </Directory>


    # Deny direct access to WEB-INF and META-INF
    #
    <Location "/stagenewngfl/WEB-INF/*">
        AllowOverride None
        deny from all
    </Location>

    <Location "/stagenewngfl/META-INF/*">
        AllowOverride None
        deny from all
    </Location>

    JkMount /stagenewngfl/servlet/*  ajp13
    JkMount /stagenewngfl/servlet/UserUpdateServlet  ajp13
    JkMount /stagenewngfl/servlet/RoleDeleteServlet  ajp13
    JkMount /stagenewngfl/servlet/CreateFeatureServlet  ajp13
    JkMount /stagenewngfl/*.jsp  ajp13
    
    #################### stagenewngfl.ngfl.gov.uk:/manager
####################

    # Static files 
    Alias /manager "/usr/local/jakarta-tomcat-4.0.4/webapps/manager"

    <Directory "/usr/local/jakarta-tomcat-4.0.4/webapps/manager">
        Options Indexes FollowSymLinks
        DirectoryIndex index.html index.htm index.jsp 
    </Directory>


    # Deny direct access to WEB-INF and META-INF
    #
    <Location "/manager/WEB-INF/*">
        AllowOverride None
        deny from all
    </Location>

    <Location "/manager/META-INF/*">
        AllowOverride None
        deny from all
    </Location>

    JkMount /manager/*.jsp  ajp13
    JkMount /manager/servlet/*  ajp13
    JkMount /manager/*  ajp13
</VirtualHost>

<VirtualHost localhost>
    ServerName localhost

    JkMount /examples ajp13
    JkMount /examples/* ajp13

    #################### localhost:/stagenewngfl ####################

    # Static files 
    Alias /stagenewngfl
"/usr/local/jakarta-tomcat-4.0.4/webapps/stagenewngfl"

    <Directory "/usr/local/jakarta-tomcat-4.0.4/webapps/stagenewngfl">
        Options Indexes FollowSymLinks
        DirectoryIndex index.jsp 
    </Directory>


    # Deny direct access to WEB-INF and META-INF
    #
    <Location "/stagenewngfl/WEB-INF/*">
        AllowOverride None
        deny from all
    </Location>

    <Location "/stagenewngfl/META-INF/*">
        AllowOverride None
        deny from all
    </Location>

    JkMount /stagenewngfl/servlet/*  ajp13
    JkMount /stagenewngfl/servlet/UserUpdateServlet  ajp13
    JkMount /stagenewngfl/servlet/RoleDeleteServlet  ajp13
    JkMount /stagenewngfl/servlet/CreateFeatureServlet  ajp13
    JkMount /stagenewngfl/*.jsp  ajp13
    
    #################### localhost:/manager ####################

    # Static files 
    Alias /manager "/usr/local/jakarta-tomcat-4.0.4/webapps/manager"

    <Directory "/usr/local/jakarta-tomcat-4.0.4/webapps/manager">
        Options Indexes FollowSymLinks
        DirectoryIndex index.html index.htm index.jsp 
    </Directory>


    # Deny direct access to WEB-INF and META-INF
    #
    <Location "/manager/WEB-INF/*">
        AllowOverride None
        deny from all
    </Location>

    <Location "/manager/META-INF/*">
        AllowOverride None
        deny from all
    </Location>

    JkMount /manager/*.jsp  ajp13
    JkMount /manager/servlet/*  ajp13
    JkMount /manager/*  ajp13
</VirtualHost>

<VirtualHost stagenewngfl.ngfl.gov.uk>
    ServerName stagenewngfl.ngfl.gov.uk

    #################### stagenewngfl.ngfl.gov.uk:/stagenewngfl
####################

    # Static files 
    Alias /stagenewngfl
"/usr/local/jakarta-tomcat-4.0.4/webapps/stagenewngfl"

    <Directory "/usr/local/jakarta-tomcat-4.0.4/webapps/stagenewngfl">
        Options Indexes FollowSymLinks
        DirectoryIndex index.jsp 
    </Directory>


    # Deny direct access to WEB-INF and META-INF
    #
    <Location "/stagenewngfl/WEB-INF/*">
        AllowOverride None
        deny from all
    </Location>

    <Location "/stagenewngfl/META-INF/*">
        AllowOverride None
        deny from all
    </Location>

    JkMount /stagenewngfl/servlet/*  ajp13
    JkMount /stagenewngfl/servlet/UserUpdateServlet  ajp13
    JkMount /stagenewngfl/servlet/RoleDeleteServlet  ajp13
    JkMount /stagenewngfl/servlet/CreateFeatureServlet  ajp13
    JkMount /stagenewngfl/*.jsp  ajp13
    
    #################### stagenewngfl.ngfl.gov.uk:/manager
####################

    # Static files 
    Alias /manager "/usr/local/jakarta-tomcat-4.0.4/webapps/manager"

    <Directory "/usr/local/jakarta-tomcat-4.0.4/webapps/manager">
        Options Indexes FollowSymLinks
        DirectoryIndex index.html index.htm index.jsp 
    </Directory>


    # Deny direct access to WEB-INF and META-INF
    #
    <Location "/manager/WEB-INF/*">
        AllowOverride None
        deny from all
    </Location>

    <Location "/manager/META-INF/*">
        AllowOverride None
        deny from all
    </Location>

    JkMount /manager/*.jsp  ajp13
    JkMount /manager/servlet/*  ajp13
    JkMount /manager/*  ajp13
</VirtualHost>

--- cut ---

Thanks again,

	Anthony.


> -----Original Message-----
> From:	Turner, John [SMTP:JTurner@AAS.com]
> Sent:	06 September 2002 17:19
> To:	'Tomcat Users List'
> Subject:	RE: Url Mapping with mod_jk
> 
> 
> Actually, posting your mod_jk.conf file would be of more help...that's
> where
> the JkMount directives that aren't working should be.
> 
> You have the Listener elements (*.ApacheConfig) in your server.xml.
> There's
> no need to have anything in httpd.conf except:
> 
> Include /some/path/to/tomcat/conf/auto/mod_jk.conf
> 
> The other thing I would change is to add forwardAll="false" to your
> Listener
> directives...the default is true, and as far as I know, unless you
> explicitly state "false", all requests for that URL will go to Tomcat,
> making Apache (and mod_jk) redundant.  You want only dynamic requests
> (*.jsp
> and servlet/*) to go to Tomcat.
> 
> A working mod_jk.conf file is here:
> http://www.johnturner.com/howto/mod_jk_conf.html
> 
> That file was generated by Tomcat, I didn't do anything to it except sub
> in
> "xxx.yyy.com" for my actual hostname.  
> 
> John
> 
> > -----Original Message-----
> > From: Anthony Milbourne [mailto:anthony.milbourne@becta.org.uk]
> > Sent: Friday, September 06, 2002 12:10 PM
> > To: 'Tomcat Users List'
> > Subject: RE: Url Mapping with mod_jk
> > 
> > 
> > Hi
> > 
> > Thanks for that help - I now realise more about how the 
> > server.xml works.
> > I have done what you said and my webapp now appears in the 
> > root url when I
> > connect direct to Tomcat (which is great).  Unfortunately 
> > when I connect via
> > Apache I get back the JSP source, as if it has not gone 
> > through Tomcat.  I
> > have played around a bit and can't figure out what is going on.  
> > Could you (or anyone) take a look at the config snippets 
> > below and see if
> > you can spot the problem.
> > 
> 
> --
> To unsubscribe, e-mail:
> <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:
> <mailto:tomcat-user-help@jakarta.apache.org>


**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.
This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.
www.mimesweeper.com
**********************************************************************


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