You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Scott Adamson <sc...@jc.com.au> on 2002/08/19 17:57:24 UTC

Can't get tomcat 4 + mod_jk + apache to work

I have been trying for the last week to get Apache + mod_jk + Tomcat 4 to
work.
I have confirmed that Tomcat works on 8080, confirmed that Apache is
running.

My configuration is as follows :

    OS -
    Redhat Linux 6.2

    Java -
    JAVA_HOME="/usr/java/jdk1.3"
    Installed via RPM

    Tomcat -
    Installed binary distribution of jakarta 4.0.4 at
/usr/local/jakarta-tomcat-4.0.4
    Created jakarta-tomcat-4.0.4/conf/jk/workers.properties as follows :

        workers.tomcat_home=/usr/local/jakarta-tomcat-4.0.4
        workers.java_home=/usr/java/jdk1.3
        ps=/
        worker.list=ajp12, ajp13
        worker.ajp13.port=8009
        worker.ajp13.host=toecutter
        worker.ajp13.type=ajp13

    Modified jakarta-tomcat-4.0.4/conf/server.xml as follows : (see
attached)

        <Server port="8005" shutdown="SHUTDOWN" debug="0">
   #added line          <Listener
className="org.apache.ajp.tomcat4.config.ApacheConfig"
modJk="/usr/local/apache2/libexec/mod_jk-3.3-ap13-noeapi.so" />
....
and

      <Host name="toecutter" debug="0" appBase="webapps" unpackWARs="true">
    #added line       <Listener
className="org.apache.ajp.tomcat4.config.ApacheConfig" append="true"
forwardAll="false" />

    Apache -
    Compiled Apache1.3.19 with the following config -
./configure --prefix=/usr/local/apache2 --enable-module=so
    Added the following to httpd.conf (see attached)
        Include /usr/local/jakarta-tomcat-4.0.4/conf/auto/mod_jk.conf

    mod_jk -
    Added the binary mod_jk-3.3-ap13-noeapi.so to /usr/local/apache2/libexec


/apache2/logs/error_log contains the following :

[Tue Aug 20 02:08:20 2002] [error] [client 192.168.0.7] File does not exist:
/usr/local/apache2/htdocs/examples/

indicating that it isn't even trying to redirect and looks for /examples
under /apache2/htdocs
Can someone please help me (thanks to those who have already tried), can
someone see a problem with my configuration ?



Scott Adamson
Systems Administrator
Syware Technology

scottadamson@sywaretech.com.au
http://upe.com.au



Re: Can't get tomcat 4 + mod_jk + apache to work

Posted by Scott Adamson <sc...@sywaretech.com.au>.
I don't know why, but I got it to work by adding the following at the end of
httpd.conf -

<IfModule !mod_jk.c>
  LoadModule jk_module /usr/local/apache2/libexec/mod_jk-3.3-ap13-noeapi.so
</IfModule>

JkWorkersFile "/usr/local/jakarta-tomcat-4.0.4/conf/jk/workers.properties"
JkLogFile "/usr/local/jakarta-tomcat-4.0.4/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


    #################### toecutter:/sywareTech ####################

    Alias /sywareTech "/usr/local/jakarta-tomcat-4.0.4/webapps/sywareTech"

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


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

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

    JkMount /sywareTech/*.jsp  ajp13
    JkMount /sywareTech/servlet/*  ajp13


#</VirtualHost>


I couldn't get it to work by including mod_jk.conf, and I couldn't get the
mod_jk src (from the Tomcat 4 dist. - no binaries avail.) to compile.
Good luck.

regards,

Scott.
----- Original Message -----
From: "Brian Orledge" <bo...@rsimail.com>
To: "'Tomcat Users List'" <to...@jakarta.apache.org>
Sent: Tuesday, August 20, 2002 11:35 PM
Subject: RE: Can't get tomcat 4 + mod_jk + apache to work


> Did you get anywhere with this.  I'm using the same configuration (minus
> the JBoss) and having the same error.
>
>
> Brian Orledge
> Revenue Solutions, Inc.
> 301.240.2182
>
> -----Original Message-----
> From: Scott Adamson [mailto:scottadamson@jc.com.au]
> Sent: Monday, August 19, 2002 11:57 AM
> To: Tomcat Users List
> Subject: Can't get tomcat 4 + mod_jk + apache to work
>
>
> I have been trying for the last week to get Apache + mod_jk + Tomcat 4
> to
> work.
> I have confirmed that Tomcat works on 8080, confirmed that Apache is
> running.

.....

>
> Scott Adamson
> Systems Administrator
> Syware Technology
>
> scottadamson@sywaretech.com.au
> http://upe.com.au
>
>
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: Can't get tomcat 4 + mod_jk + apache to work

Posted by Brian Orledge <bo...@rsimail.com>.
Did you get anywhere with this.  I'm using the same configuration (minus
the JBoss) and having the same error.


Brian Orledge
Revenue Solutions, Inc.
301.240.2182

-----Original Message-----
From: Scott Adamson [mailto:scottadamson@jc.com.au] 
Sent: Monday, August 19, 2002 11:57 AM
To: Tomcat Users List
Subject: Can't get tomcat 4 + mod_jk + apache to work


I have been trying for the last week to get Apache + mod_jk + Tomcat 4
to
work.
I have confirmed that Tomcat works on 8080, confirmed that Apache is
running.

My configuration is as follows :

    OS -
    Redhat Linux 6.2

    Java -
    JAVA_HOME="/usr/java/jdk1.3"
    Installed via RPM

    Tomcat -
    Installed binary distribution of jakarta 4.0.4 at
/usr/local/jakarta-tomcat-4.0.4
    Created jakarta-tomcat-4.0.4/conf/jk/workers.properties as follows :

        workers.tomcat_home=/usr/local/jakarta-tomcat-4.0.4
        workers.java_home=/usr/java/jdk1.3
        ps=/
        worker.list=ajp12, ajp13
        worker.ajp13.port=8009
        worker.ajp13.host=toecutter
        worker.ajp13.type=ajp13

    Modified jakarta-tomcat-4.0.4/conf/server.xml as follows : (see
attached)

        <Server port="8005" shutdown="SHUTDOWN" debug="0">
   #added line          <Listener
className="org.apache.ajp.tomcat4.config.ApacheConfig"
modJk="/usr/local/apache2/libexec/mod_jk-3.3-ap13-noeapi.so" />
....
and

      <Host name="toecutter" debug="0" appBase="webapps"
unpackWARs="true">
    #added line       <Listener
className="org.apache.ajp.tomcat4.config.ApacheConfig" append="true"
forwardAll="false" />

    Apache -
    Compiled Apache1.3.19 with the following config -
./configure --prefix=/usr/local/apache2 --enable-module=so
    Added the following to httpd.conf (see attached)
        Include /usr/local/jakarta-tomcat-4.0.4/conf/auto/mod_jk.conf

    mod_jk -
    Added the binary mod_jk-3.3-ap13-noeapi.so to
/usr/local/apache2/libexec


/apache2/logs/error_log contains the following :

[Tue Aug 20 02:08:20 2002] [error] [client 192.168.0.7] File does not
exist:
/usr/local/apache2/htdocs/examples/

indicating that it isn't even trying to redirect and looks for /examples
under /apache2/htdocs
Can someone please help me (thanks to those who have already tried), can
someone see a problem with my configuration ?



Scott Adamson
Systems Administrator
Syware Technology

scottadamson@sywaretech.com.au
http://upe.com.au




--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>