Hello All,

A.

I'm trying to connect Apache with Tomcat, using mod_jk. My Apache version is
Apache/2.2.3. Tomcat version is Apache Tomcat/5.5.17.

B.

Doing uname -a on my machine gave me Linux 2.6.18-6-amd64 #1 SMP Sun Feb 10
17:50:19 UTC 2008 x86_64 GNU/Linux. I downloaded
tomcat-connectors-1.2.26-src from
http://tomcat.apache.org/download-connectors.cgi, built it using apxs2 which
I got from apt-get install apache2-threaded-dev. After building
tomcat-connectors-1.2.26-src, the mod_jk.so was copied to
/usr/lib/apache2/modules/ .


C.

The content of apache2.conf for tomcat connector is:

Include /usr/local/tomcat/conf/auto/mod_jk.conf

D.

Contents of /usr/local/tomcat/conf/auto/mod_jk.conf:

<IfModule !mod_jk.c>
  LoadModule jk_module "/usr/lib/apache2/modules/mod_jk.so"
</IfModule>

JkWorkersFile "/usr/local/apache2/workers.properties"
JkLogFile "/usr/local/apache-tomcat-5.5.17/logs/mod_jk.log"
JkMountFile "/usr/local/apache2/uriworkermap.properties"

JkLogLevel debug


<VirtualHost x.x.x.x:80>   (using localhost here gave the same results)
    ServerName a.b.com      (using localhost here gave the same results)

Alias /AuditOnlineV2_Attendance
"/usr/local/tomcat/webapps/AuditOnlineV2_Attendance/"

   <Directory "/usr/local/tomcat/webapps/AuditOnlineV2_Attendance">
         Options FollowSymLinks
         AllowOverride None
         Allow from all
         DirectoryIndex index.jsp
   </Directory>

Alias /webapps "/usr/local/tomcat/webapps/"

<Directory "/usr/local/tomcat/webapps">
         Options FollowSymLinks
         AllowOverride None
         Allow from all
         DirectoryIndex index.jsp
   </Directory>

</VirtualHost>


E.

The contents of /usr/local/apache2/workers.properties :

workers.tomcat_home=/usr/local/tomcat
workers.java_home=/usr/bin/java
ps=/
worker.list=worker1
worker.worker1.port=8009
worker.worker1.host=localhost
worker.worker1.type=ajp13
worker.worker1.lbfactor=1


F.

The contents of /usr/local/apache2/uriworkermap.properties :

/=worker1
/*=worker1
/*.jsp=worker1


/webapps=worker1
/webapps/*=worker1


/AuditOnlineV2_Attendance=worker1
/AuditOnlineV2_Attendance/*=worker1


G.

The contents of tomcat/conf/server.xml :


 <!-- Define the Tomcat Stand-Alone Service -->
        <Service name="Catalina">
                <!-- A "Connector" represents an endpoint by which requests
are received and responses are returned. Each Connector passes requests on
to the associated "Container" (normally an Engine) for processing. -->
                <!-- Define a non-SSL HTTP/1.1 Connector on port 2117
(default 8080) -->

                <!-- 8080 is being used by a  different application -->

                <Connector port="2117" maxHttpHeaderSize="8192"
maxThreads="150" minSpareThreads="5" maxSpareThreads="75"
enableLookups="false" redirectPort="8443" acceptCount="100"
connectionTimeout="20000" disableUploadTimeout="true" />



                <!-- Define an AJP 1.3 Connector on port 8009 -->
                <Connector port="8009" enableLookups="false"
redirectPort="8443" protocol="AJP/1.3" />

                <!-- Define a Proxied HTTP/1.1 Connector on port 8082 -->
<!-- See proxy documentation for more information about using this. -->

                <!--
                <Connector port="8082" maxThreads="150" minSpareThreads="25"
maxSpareThreads="75" enableLookups="false" acceptCount="100"
connectionTimeout="20000" proxyPort="80" disableUploadTimeout="true" />
                -->

                <!-- An Engine represents the entry point (within Catalina)
that processes every request. The Engine implementation for Tomcat stand
alone analyzes the HTTP headers included with the request, and passes them
on to the appropriate Host (virtual host). -->
                <!-- Define the top level container in our container
hierarchy -->
                <Engine name="Catalina" defaultHost="localhost">
                        <Realm
className="org.apache.catalina.realm.UserDatabaseRealm"
resourceName="UserDatabase"/>

                        <!-- Define the default virtual host -->
                        <Host name="localhost" appBase="webapps"
unpackWARs="true" autoDeploy="true" xmlValidation="false"
xmlNamespaceAware="false">
                                <Valve
className="org.apache.catalina.valves.AccessLogValve" directory="logs"
prefix="localhost_access_log." suffix=".txt" pattern="common"
resolveHosts="false"/>
                        </Host>

                        <Listener
className="org.apache.jk.config.ApacheConfig"
modJk="/usr/lib/apache2/modules/mod_jk.so"
workersConfig="/usr/local/apache2/workers.properties"/>
                </Engine>
        </Service>



H.

 I started tomcat as user tomcat. I started apache2 as root.  Then I went to
http://a.b.com as the server.  What I got was the directory listing of that
directory. Clicking on AuditOnlineV2_Attendance/ got me to the directory
listing for AuditOnlineV2_Attendance/, and clicking on the index.jsp in that
directory came up with the jsp code of that file.

I was expecting to see the graphics, etc of the actual site.



I've been on this problem for over 3 days. Pls help.


Laurence

Reply via email to