Hi All,

I am still dorking around with this after writing the list a couple of weeks
ago.  I am trying to run JSPs using tomcat through Apache virtual hosts.  To
refresh, I have 2 domains, I want one to run JSPs, the other one will not.
All I can think to do at this point is send you my configuration files with
hopes that one of you will recognize an error that I made and make
suggestions for correcting it.  Please let me know if I left out any
relevant information.  Sorry if this is all a mess, it is my first time
configuring Tomcat.

Thank You in advance for your time.

Mike
   

1. Environment:
        RHEL 3
        Apache 2.0.48
        Tomcat 4.1

2. Documents read/followed:

http://cymulacrum.net/writings/tomcat5/book1.html

http://www.galatea.com/flashguides/virtual-hosting-tomcat.xml

http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jk2/jk2/vhosthowto.html

http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jk2/jk/aphowto.html

3. Configuration Files:

Apache Configuration Files: 

A.  /usr/local/apache2/conf/httpd.conf, relevant sections


#
# Dynamic Shared Object (DSO) Support
#
# To be able to use the functionality of a module which was built as a DSO
you
# have to place corresponding `LoadModule' lines at this location so the
# directives contained in it are actually available _before_ they are used.
# Statically compiled modules (those listed by `httpd -l') do not need
# to be loaded here.
#
# Example:
# LoadModule foo_module modules/mod_foo.so
#

LoadModule jk2_module modules/mod_jk2.so

[..]

#Virtual Hosts
NameVirtualHost *:80

<VirtualHost *:80>
        ServerAdmin [EMAIL PROTECTED]
        DocumentRoot /usr/local/apache2/htdocs
        ServerName www.consultantsnetwork.com
        ErrorLog logs/cn/cn-error_log
        CustomLog logs/cn/cn-access_log common
</VirtualHost>

<VirtualHost *:80>
        ServerAdmin [EMAIL PROTECTED]
        DocumentRoot /usr/local/apache2/htdocs/LV
        ServerName www.learningvoyage.com
        ErrorLog logs/lv/lv-error_log
        CustomLog logs/lv/lv-access_log common
</VirtualHost>

============================================================================
==================
B.  /usr/local/apache2/conf/workers2.properties:

[EMAIL PROTECTED] conf]# more workers2.properties
# Workers2.properties

[logger.apache2]
level=debug

[shm]
info=Scoreboard. Required for reconfiguration and status with multiprocess
servers
file=/opt/jakarta/jakarta-tomcat/logs/jk2.shm
size=1048576
debug=0
disabled=0

#Unix domain socket
[channel.un:/opt/jakarta/jakarta-tomcat/work/jk2.socket]
tomcatId=localhost:8009
debug=0

# define the worker
[ajp13:/opt/jakarta/jakarta-tomcat/work/jk2.socket]
channel=channel.un:/opt/jakarta/jakarta-tomcat/work/jk2.socket

#Announce a "status" worker
[status:status]
info=Status worker. Displays runtime information.

[uri:/jkstatus/*]
group=status:status

# Uri Mapping
# Double check this URI mapping ~RU
[uri:www.consultantsnetwork.com/*.jsp]

============================================================================
=======================
============================================================================
=======================

Tomcat Configuration Files:

/opt/jakarta/jakarta-tomcat/conf/server.xml: Mostly default.  I will post
ony changed sections here.

    <!-- Define a non-SSL Coyote HTTP/1.1 Connector on port 8008 -->
    <Connector className="org.apache.coyote.tomcat4.CoyoteConnector"
               port="8008" minProcessors="5" maxProcessors="75"
               enableLookups="true" redirectPort="8443"
               acceptCount="100" debug="0" connectionTimeout="20000"
               useURIValidationHack="false" disableUploadTimeout="true" />
    <!-- Note : To disable connection timeouts, set connectionTimeout value
     to 0 -->

    <!-- Define a SSL Coyote HTTP/1.1 Connector on port 8443 -->
    <!--
    <Connector className="org.apache.coyote.tomcat4.CoyoteConnector"
               port="8443" minProcessors="5" maxProcessors="75"
               enableLookups="true"
           acceptCount="100" debug="0" scheme="https" secure="true"
               useURIValidationHack="false" disableUploadTimeout="true">
      <Factory
className="org.apache.coyote.tomcat4.CoyoteServerSocketFactory"
               clientAuth="false" protocol="TLS" />
    </Connector>
    -->

    <!-- Define a Coyote/JK2 AJP 1.3 Connector on port 8009 -->
    <Connector className="org.apache.coyote.tomcat4.CoyoteConnector"
               port="8009" minProcessors="5" maxProcessors="75"
               enableLookups="true" redirectPort="8443"
               acceptCount="10" debug="0" connectionTimeout="0"
               useURIValidationHack="false"
 
protocolHandlerClassName="org.apache.jk.server.JkCoyoteHandler"/>

    <!-- Define an AJP 1.3 Connector on port 8009 -->
    <!--
    <Connector className="org.apache.ajp.tomcat4.Ajp13Connector"
               port="8009" minProcessors="5" maxProcessors="75"
               acceptCount="10" debug="0"/>
    -->

[..]

        <!-- Tomcat CN Context -->
        <Engine name="Apache" defaultHost="www.consultantsnetwork.com"
debug="0">
        <Host name="www.consultantsnetwork.com" debug="0"
                appBase="$TOMCAT_HOME/webapps/ROOT/"
                unpackWARs="true" autoDeploy="true">
                <Context Path="$TOMCAT_HOME/webapps/ROOT/" docBase="ROOT"
debug="0"
                        reloadable="true" crossContext="true">
                <Logger className="org.apache.catallina.logger.FileLogger"
                        prefix="localhost_cn_log." suffix=".txt"
                        timestamp="true"/>
                <Resource name="mail/Session" auth="Container"
                        type="javax.mail.Session"/>
                <ResourceParams name="mail/Session">
                        <parameter>
                                <name>mail.smtp.host</name>
                                <value>216.196.239.90</value>
                        </parameter>
                </ResourceParams>
                </Context>
        </Host>
        </Engine>
    </Engine>

  </Service>


</Server>


============================================================================
========================
4. Log Files:

A.  /opt/jakarta/jakarta-tomcat/conf/logs/catalina.out (tail -n 40)

Starting service Tomcat-Standalone
Apache Tomcat/4.1.30
Mar 25, 2004 11:50:09 AM org.apache.struts.util.PropertyMessageResources
<init>
INFO: Initializing, config='org.apache.struts.util.LocalStrings',
returnNull=true
Mar 25, 2004 11:50:09 AM org.apache.struts.util.PropertyMessageResources
<init>
INFO: Initializing, config='org.apache.struts.action.ActionResources',
returnNull=true
Mar 25, 2004 11:50:10 AM org.apache.struts.util.PropertyMessageResources
<init>
INFO: Initializing, config='org.apache.webapp.admin.ApplicationResources',
returnNull=true
Mar 25, 2004 11:50:11 AM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on port 8008
Mar 25, 2004 11:50:11 AM org.apache.jk.server.JkMain start
INFO: APR not loaded, disabling jni components: java.io.IOException:
java.lang.UnsatisfiedLinkError: /usr/local/apache2/modules/jkjni.so:
/usr/local/apache2/lib/libaprutil-0.so.0: undefined symbol: gdbm_errno
Mar 25, 2004 11:50:11 AM org.apache.jk.common.ChannelSocket init
INFO: JK2: ajp13 listening on /0.0.0.0:8009
Mar 25, 2004 11:50:11 AM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=1/63
config=/opt/jakarta/jakarta-tomcat/conf/jk2.properties
Stopping service Tomcat-Standalone
Mar 25, 2004 12:23:22 PM org.apache.coyote.http11.Http11Protocol destroy
INFO: Stoping http11 protocol on 8008 Catalina:type=ThreadPool,name=http8008
Mar 25, 2004 1:04:30 PM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on port 8008
Starting service Tomcat-Standalone
Apache Tomcat/4.1.30
Mar 25, 2004 1:04:32 PM org.apache.struts.util.PropertyMessageResources
<init>
INFO: Initializing, config='org.apache.struts.util.LocalStrings',
returnNull=true
Mar 25, 2004 1:04:32 PM org.apache.struts.util.PropertyMessageResources
<init>
INFO: Initializing, config='org.apache.struts.action.ActionResources',
returnNull=true
Mar 25, 2004 1:04:32 PM org.apache.struts.util.PropertyMessageResources
<init>
INFO: Initializing, config='org.apache.webapp.admin.ApplicationResources',
returnNull=true
Mar 25, 2004 1:04:35 PM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on port 8008
Mar 25, 2004 1:04:35 PM org.apache.jk.server.JkMain start
INFO: APR not loaded, disabling jni components: java.io.IOException:
java.lang.UnsatisfiedLinkError:
/opt/jakarta/jakarta-tomcat-connectors/jk/build/jk2/apache2/jkjni.so:
/usr/local/apache2/lib/libaprutil-0.so.0: undefined symbol: gdbm_errno
Mar 25, 2004 1:04:35 PM org.apache.jk.common.ChannelSocket init
INFO: JK2: ajp13 listening on /0.0.0.0:8009
Mar 25, 2004 1:04:35 PM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=13/167
config=/opt/jakarta/jakarta-tomcat/conf/jk2.properties
Stopping service Tomcat-Standalone
Mar 25, 2004 2:52:00 PM org.apache.coyote.http11.Http11Protocol destroy
INFO: Stoping http11 protocol on 8008 Catalina:type=ThreadPool,name=http8008

============================================================================
===============









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

Reply via email to