tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From August Detlefsen <augustd...@yahoo.com>
Subject Re: HELP on server.xml PLEASE
Date Fri, 01 Feb 2002 22:00:59 GMT
I am pretty sure that you need to add the contexts within your virtual
hosts. If the same context needs to be accessed from multiple virtual
hosts, you have to define it for each one. 

Does anyone know of a way to deploy a context across multiple virtual
hosts? 




--- Micael Padraig Og mac Grene <caraunltd@harbornet.com> wrote:
> My forte is Java and at the XML configuration of Tomcat I suck. 
> Could 
> someone please help me with this?  It would be greatly appreciated.
> 
> If I add the following to servlet.xml, then I get the startup.sh to
> create 
> the proper directories under TOMCAT_HOME/work/.  But, then I cannot
> reach 
> my site with the urls.  If I don't add these, then I can reach the
> site, 
> but without the create of the appropriate subfolders.  What is up?
> 
> 
> 
> 	<Context path="/ourforge"
> 		docBase="webapps/ourforge"
> 		debug="0"
> 		reloadable="true">
> 	</Context>
> 	<Context path="/micael"
> 		docBase="webapps/micael"
> 		debug="0"
> 		reloadable="true" >
> 	</Context>
> 	<Context path="/db"
> 		docBase="webapps/db"
> 		debug="0"
> 		reloadable="true" >
> 	</Context>
> 	<Context path="/ctr"
> 		docBase="webapps/ctr"
> 		debug="0"
> 		reloadable="true" >
> 	</Context>
> 
> <!-- Example Server Configuration File -->
> <!-- Note that component elements are nested corresponding to their
>       parent-child relationships with each other -->
> 
> <!-- A "Server" is a singleton element that represents the entire
> JVM,
>       which may contain one or more "Service" instances.  The Server
>       listens for a shutdown command on the indicated port.
> 
>       Note:  A "Server" is not itself a "Container", so you may not
>       define subcomponents such as "Valves" or "Loggers" at this
> level.
>   -->
> 
> <Server port="8005" shutdown="SHUTDOWN" debug="0">
> 
> 
>    <!-- A "Service" is a collection of one or more "Connectors" that
> share
>         a single "Container" (and therefore the web applications
> visible
>         within that Container).  Normally, that Container is an
> "Engine",
>         but this is not required.
> 
>         Note:  A "Service" is not itself a "Container", so you may
> not
>         define subcomponents such as "Valves" or "Loggers" at this
> level.
>     -->
> 
>    <!-- Define the Tomcat Stand-Alone Service -->
>    <Service name="Tomcat-Standalone">
> 
>      <!-- 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.
> 
>           By default, a non-SSL HTTP/1.1 Connector is established on
> port 8080.
>           You can also enable an SSL HTTP/1.1 Connector on port 8443
> by
>           following the instructions below and uncommenting the
> second 
> Connector
>           entry.  SSL support requires the following steps (see the
> SSL Config
>           HOWTO in the Tomcat 4.0 documentation bundle for more
> detailed
>           instructions):
>           * Download and install JSSE 1.0.2 or later, and put the JAR
> files
>             into "$JAVA_HOME/jre/lib/ext".
>           * Execute:
>               %JAVA_HOME%\bin\keytool -genkey -alias tomcat -keyalg
> RSA 
> (Windows)
>               $JAVA_HOME/bin/keytool -genkey -alias tomcat -keyalg
> RSA  (Unix)
>             with a password value of "changeit" for both the
> certificate and
>             the keystore itself.
> 
>           By default, DNS lookups are enabled when a web application
> calls
>           request.getRemoteHost().  This can have an adverse impact
> on
>           performance, so you can disable it by setting the
>           "enableLookups" attribute to "false".  When DNS lookups are
> disabled,
>           request.getRemoteHost() will return the String version of
> the
>           IP address of the remote client.
>      -->
> 
>      <!-- Define a non-SSL HTTP/1.1 Connector on port 8080 -->
>      <Connector
> className="org.apache.catalina.connector.http.HttpConnector"
> 	    port="8080" minProcessors="5" maxProcessors="75"
> 	       enableLookups="true" redirectPort="8443"
>                 acceptCount="10" debug="0"
> connectionTimeout="60000"/>
>      <!-- Note : To disable connection timeouts, set
> connectionTimeout value
>       to -1 -->
> 
>      <!-- Define an SSL HTTP/1.1 Connector on port 8443 -->
>      <!--
>      <Connector
> className="org.apache.catalina.connector.http.HttpConnector"
>                 port="8443" minProcessors="5" maxProcessors="75"
>                 enableLookups="true"
> 	       acceptCount="10" debug="0" scheme="https" secure="true">
>        <Factory
> className="org.apache.catalina.net.SSLServerSocketFactory"
>                 clientAuth="false" protocol="TLS"/>
>      </Connector>
>      -->
> 
>      <!-- 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"/>
>      -->
> 
>      <!-- Define a Proxied HTTP/1.1 Connector on port 8081 -->
>      <!-- See proxy documentation for more information about using
> this. -->
>      <!--
>      <Connector
> className="org.apache.catalina.connector.http.HttpConnector"
>                 port="8081" minProcessors="5" maxProcessors="75"
>                 enableLookups="true"
>                 acceptCount="10" debug="0" connectionTimeout="60000"
>                 proxyPort="80"/>
>      -->
> 
>      <!-- Define a non-SSL HTTP/1.0 Test Connector on port 8082 -->
>      <!--
>      <Connector
> className="org.apache.catalina.connector.http10.HttpConnector"
>                 port="8082" minProcessors="5" maxProcessors="75"
>                 enableLookups="true" redirectPort="8443"
>                 acceptCount="10" debug="0"/>
>      -->
> 
>      <!-- 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="Standalone" defaultHost="localhost" debug="0">
> 
>        <!-- The request dumper valve dumps useful debugging
> information about
>             the request headers and cookies that were received, and
> the 
> response
>             headers and cookies that were sent, for all requests
> received by
>             this instance of Tomcat.  If you care only about requests
> to a
>             particular virtual host, or a particular application,
> nest this
>             element inside the corresponding <Host> or <Context>
> entry instead.
> 
>             For a similar mechanism that is portable to all Servlet
> 2.3
>             containers, check out the "RequestDumperFilter" Filter in
> the
>             example application (the source for this filter may be
> found in
>            
> "$CATALINA_HOME/webapps/examples/WEB-INF/classes/filters").
> 
>             Request dumping is disabled by default.  Uncomment the
> following
> 
=== message truncated ===


__________________________________________________
Do You Yahoo!?
Great stuff seeking new owners in Yahoo! Auctions! 
http://auctions.yahoo.com

--
To unsubscribe:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands: <mailto:tomcat-user-help@jakarta.apache.org>
Troubles with the list: <mailto:tomcat-user-owner@jakarta.apache.org>


Mime
View raw message