Hi,

I am very new to Tomcat, but I need to setup a Development/Teaching
Enviroment for Apache and Tomcat.

I have installed and tested the following :-

Apache 2.0.47 - installed from rpm 
Tomcat 4.1.27 - binary install
mod_jk2 2.0.2 - installed from source
j2sdk 1.4.2_01 - installed from rpm

I need a setup with ip based virtual hosts and the code stored in the
users/students home directories so each student can not see each others
work. 

Then a method for the user/student to publish there work.

Any help would be appreciated.

Please see below for current config files :- 

Regards

--
Paul Mills <[EMAIL PROTECTED]>
Senior Linux/Unix Systems Administrator
(Red Hat Certified Engineer)
Canterbury Christ Church University College
North Holmes Road
Canterbury
Kent
United Kingdom
CT1 1QU
Tel.: 01227 782751 

Config Files :- 

workers2.properties =====================================================
# only at beginnin. In production uncomment it out [logger.apache2]
level=DEBUG

[shm]
file=/etc/httpd/logs/jk2.shm
size=1048576

# Example socket channel, override port and host.
[channel.socket:localhost:8009] tomcatId=localhost:8009 #port=8009
#host=127.0.0.1

# define the worker
[ajp13:localhost:8009]
channel=channel.socket:localhost:8009

# Uri mapping
#[uri:5.0.0.61/*.jsp]
#group=ajp13:localhost:8009
#
#[uri:www.domain-a.com/*.jsp]
#worker=ajp13:localhost:8009

[status:]
info=Status worker,display runtime information channel.socket:localhost:8009

# Uri mapping
[uri:/status/*]
group=status:localhost:8009
#worker=status:localhost:8009
group=status:
#debug=9

# Map the Tomcat examples webapp to the Web server uri space
[uri:/examples/*] group=ajp13:localhost:8009 info=Map the whole webapp
worker=ajp13:localhost:8009

# Map the Tomcat examples webapp to the Web server uri space
[uri:/tomcat-docs/*] group=ajp13:localhost:8009
=====================================================

jk2.properties =====================================================
# Shared memory directive
shm.file=/etc/httpd/logs/jk2.shm
=====================================================

server.xml =====================================================
<!-- Example Server Configuration File -->
<!-- Note that component elements are nested corresponding to their
     parent-child relationships with each other -->

<Server port="8005" shutdown="SHUTDOWN" debug="0">

  <Listener className="org.apache.catalina.mbeans.ServerLifecycleListener"
            debug="0"/>
  <Listener
className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener"
            debug="0"/>

  <!-- Global JNDI resources -->
  <GlobalNamingResources>

    <!-- Test entry for demonstration purposes -->
    <Environment name="simpleValue" type="java.lang.Integer" value="30"/>

    <!-- Editable user database that can also be used by
         UserDatabaseRealm to authenticate users -->
    <Resource name="UserDatabase" auth="Container"
              type="org.apache.catalina.UserDatabase"
       description="User database that can be updated and saved">
    </Resource>
    <ResourceParams name="UserDatabase">
      <parameter>
        <name>factory</name>
        <value>org.apache.catalina.users.MemoryUserDatabaseFactory</value>
      </parameter>
      <parameter>
        <name>pathname</name>
        <value>conf/tomcat-users.xml</value>
      </parameter>
    </ResourceParams>

  </GlobalNamingResources>

  <!-- Define the Tomcat Stand-Alone Service -->
  <Service name="Tomcat-Standalone">

    <!-- 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="20000"
               useURIValidationHack="false"
 
protocolHandlerClassName="org.apache.jk.server.JkCoyoteHandler"/>

    <!-- Define the top level container in our container hierarchy -->
    <Engine name="Standalone" defaultHost="localhost" debug="0">

      <!-- Global logger unless overridden at lower levels -->
      <Logger className="org.apache.catalina.logger.FileLogger"
              prefix="catalina_log." suffix=".txt"
              timestamp="true"/>

      <Realm className="org.apache.catalina.realm.UserDatabaseRealm"
                 debug="0" resourceName="UserDatabase"/>

      <Host name="localhost" debug="0" appBase="webapps"
       unpackWARs="true" autoDeploy="true">

        <Logger className="org.apache.catalina.logger.FileLogger"
                 directory="logs"  prefix="localhost_log." suffix=".txt"
            timestamp="true"/>

        <!-- Tomcat Examples Context -->
        <Context path="/examples" docBase="examples" debug="0"
                 reloadable="true" crossContext="true">
          <Logger className="org.apache.catalina.logger.FileLogger"
                     prefix="localhost_examples_log." suffix=".txt"
              timestamp="true"/>
          <Ejb   name="ejb/EmplRecord" type="Entity"
                 home="com.wombat.empl.EmployeeRecordHome"
               remote="com.wombat.empl.EmployeeRecord"/>

          <Environment name="maxExemptions" type="java.lang.Integer"
                      value="15"/>
          <Parameter name="context.param.name" value="context.param.value"
                     override="false"/>
          <Resource name="jdbc/EmployeeAppDb" auth="SERVLET"
                    type="javax.sql.DataSource"/>
          <ResourceParams name="jdbc/EmployeeAppDb">
            <parameter><name>username</name><value>sa</value></parameter>
            <parameter><name>password</name><value></value></parameter>
            <parameter><name>driverClassName</name>
              <value>org.hsql.jdbcDriver</value></parameter>
            <parameter><name>url</name>
              <value>jdbc:HypersonicSQL:database</value></parameter>
          </ResourceParams>
          <Resource name="mail/Session" auth="Container"
                    type="javax.mail.Session"/>
          <ResourceParams name="mail/Session">
            <parameter>
              <name>mail.smtp.host</name>
              <value>localhost</value>
            </parameter>
          </ResourceParams>
          <ResourceLink name="linkToGlobalResource"
                    global="simpleValue"
                    type="java.lang.Integer"/>
        </Context>

      </Host>

    </Engine>

  </Service>


</Server>

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

httpd.conf =====================================================
<snip>
# domain-a.com
<VirtualHost 5.0.0.61:80>
    DocumentRoot /home/paulm/apache
    #DocumentRoot /usr/jakarta-tomcat/work/domain-a/domain-a.com
    ServerName domain-a.com
    ServerAlias www.domain-a.com
    ErrorLog logs/domain-a.com-error_log
    CustomLog logs/domain-a.com-access_log extended
<Location "/*.jsp">
        JkUriSet worker ajp13:localhost:8009
</Location>
#    <Location "/*.jsp">
#        JkUriSet worker ajp13:5.0.0.61:8009
#    </Location>
</VirtualHost>

<VirtualHost 5.0.0.62:80>
    DocumentRoot /home/paulm/tomcat
    #DocumentRoot /home/paulm/apache
    ServerName domain-b.com
    ServerAlias www.domain-b.com
    ErrorLog logs/domain-b.com-error_log
    CustomLog logs/domain-b.com-access_log extended </VirtualHost>

<IfModule !mod_jk2.c>
    LoadModule jk2_module modules/mod_jk2.so
    JkSet config.file /etc/httpd/conf/workers2.properties
</IfModule>

<IfModule mod_jk2.c>
    JkSet config:file /etc/httpd/conf/workers2.properties
</IfModule>
<snip>
=====================================================



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

Reply via email to