On Thu, Sep 19, 2002 at 11:00:02AM +1000, Rodney Schneider wrote:
> On Thu, 19 Sep 2002 07:34, you wrote:
> > All,
> >
> > I am setting up Apache 2.0.40 to be the front end to a Turbine based
> > app that some developers are building.  I need this to work through
> > Apache so we can protect the site with SSL.
> >
> > On the Tomcat list I found a really good how-to compiling mod_jk and
> > getting it work with apache. (The howto is at
> > http://www.johnturner.com/howto/apache-tomcat-howto.html)  Unfortunately,
> > the TDK test app would not work through Apache.
> 
> Could you explain what you mean by "would not work"?  What happened?

I would get 404 errors from apache. 

> 
> > To test my Apache
> > configuration to see if the problem was there, I downloaded vanilla
> > Tomcat 4.0.4 and configured it and Apache to work together.  As I
> > expected, Tomcat worked fine through Apache.
> 
> When you say it worked fine, you mean you didn't have any problems at all?

The servlet or JSP would produce output that was rendered by my browser.
I used the example applications that Tomcat came with.

> 
> > One of the things that I noticed that was not working the way it
> > should was that mod_jk.conf was not being created automatically like
> > it should (and was with the vanilla Tomcat install.)  Is this a
> > known issue?
> 
> We use Apache 1.3.26 with mod_jk without problems, but I have never seen a 
> mod_jk.conf file...  we configure mod_jk in httpd.conf and there is a 
> workers.properties file.  What is supposed to be in mod_jk.conf?

In $CATALINA_HOME/conf/auto (the auto directory is created if it is not
there) Tomcat creates the mod_jk.conf file to INCLUDE in your httpd.conf
file which contains the correct directory mapping to access the applications
listed in the server.xml  Here is the one that Tomcat created for me:


########## Auto generated on Tue Sep 17 14:55:36 CDT 2002##########

<IfModule !mod_jk.c>
  LoadModule jk_module /home/apache/modules/mod_jk.so
</IfModule>

JkWorkersFile "/home/apache/tomcat/conf/jk/workers.properties"
JkLogFile "/home/apache/tomcat/logs/mod_jk.log"

JkLogLevel emerg



<VirtualHost polaris>
    ServerName polaris

    #################### polaris:/manager ####################

    # Static files 
    Alias /manager "/home/apache/tomcat/webapps/manager"

    <Directory "/home/apache/tomcat/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/*  ajp13
    JkMount /manager/*.jsp  ajp13
    JkMount /manager/servlet/*  ajp13

    #################### polaris:/examples ####################

    # Static files 
    Alias /examples "/home/apache/tomcat/webapps/examples"

    <Directory "/home/apache/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/jsp/security/protected/j_security_check  ajp13
    JkMount /examples/CompressionTest  ajp13
    JkMount /examples/SendMailServlet  ajp13
    JkMount /examples/servletToJsp  ajp13
    JkMount /examples/snoop  ajp13
    JkMount /examples/*.jsp  ajp13
    JkMount /examples/servlet/*  ajp13

    #################### polaris:/tomcat-docs ####################

    # Static files 
    Alias /tomcat-docs "/home/apache/tomcat/webapps/tomcat-docs"

    <Directory "/home/apache/tomcat/webapps/tomcat-docs">
        Options Indexes FollowSymLinks
        DirectoryIndex index.html index.htm index.jsp 
    </Directory>


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

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

    JkMount /tomcat-docs/*.jsp  ajp13
    JkMount /tomcat-docs/servlet/*  ajp13

    #################### polaris:/webdav ####################

    # Static files 
    Alias /webdav "/home/apache/tomcat/webapps/webdav"

    <Directory "/home/apache/tomcat/webapps/webdav">
        Options Indexes FollowSymLinks
        DirectoryIndex index.jsp index.html index.htm 
    </Directory>


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

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

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

> 
> > In order to get this working, should I build Turbine from scratch or
> > can someone help me out in getting Turbine working through Apache?
> 
> I have never used Apache 2.0.x, only Apache 1.3.x, but I can try to help if 
> you ask questione on this list.

Thanks.  I can send my httpd.conf and server.xml as well if that helps.
Also, let me know if you need any more info.

Kent

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to