Minimal.conf

From Resin 3.0

(Difference between revisions)
Jump to: navigation, search
 
 
(One intermediate revision by one user not shown)
Line 30: Line 30:
 
   <log name="" level="info" path="stdout:"/>
 
   <log name="" level="info" path="stdout:"/>
 
   
 
   
   <server>
+
   <cluster id="">
    <http server-id="" host="*" port="8080"/>
+
      <server id="">
+
        <http port="8080"/>
 +
      </server>
 +
 
 
     <resin:import path="${resin.home}/conf/app-default.xml"/>
 
     <resin:import path="${resin.home}/conf/app-default.xml"/>
 
   
 
   
 
     <host id="" root-directory=".">
 
     <host id="" root-directory=".">
       <web-app id="/" document-directory="docs"/>
+
       <web-app id="/" root-directory="docs"/>
 
     </host>
 
     </host>
   </server>
+
   </cluster>
 
  </resin>
 
  </resin>
  
==command line and -server-root==
+
==command line and -resin-root==
  
  unix> bin/httpd.sh -server-root /var/www -conf conf/resin.conf
+
  unix> java -jar lib/resin.jar -resin-root /var/www -conf conf/resin.conf
  
The [[-server-root]] argument specifies the main directory for the Resin instance.  In this example, the document directory is in _/var/www/docs_.
+
The [[-resin-root]] argument specifies the main directory for the Resin instance.  In this example, the document directory is in _/var/www/docs_.
  
As an alternative, either the <[[server]]> or the <[[host]]> can specify the actual <[[root-directory]]>, e.g. {{root-directory="/var/www"}}.  Using the command line adds some flexibility, but also makes the resin.conf more difficult to read as a standalone file.
+
As an alternative, either the <[[cluster]]> or the <[[host]]> can specify the actual <[[root-directory]]>, e.g. {{root-directory="/var/www"}}.  Using the command line adds some flexibility, but also makes the resin.conf more difficult to read as a standalone file.
  
 
==description==
 
==description==
Line 53: Line 55:
 
===<[[resin]]>===
 
===<[[resin]]>===
  
The <[[resin]]> tag is the top-level tag for the resin.conf.
+
The <[[resin]]> directive is the top-level directive for the resin.conf.
  
 
===xmlns and xmlns:resin===
 
===xmlns and xmlns:resin===
  
The xmlns and xmlns:resin tags define the XML namespaces for the resin.conf.  These namespaces are important for the configuration file validation.
+
The xmlns and xmlns:resin directives define the XML namespaces for the resin.conf.  These namespaces are important for the configuration file validation.
 
+
===<[[server]]>===
+
  
The <[[server]]> configures a Resin server.  Each <[[server]]> listens to TCP ports (usually HTTP) and defines a number of [virtual hosts].
+
===<[[cluster]]>===
  
Although it is possible to have multiple <[[server]]> items, most sites will only use a single <[[server]]>.  
+
The <[[cluster]]> configures a Resin cluster, containing a number of servers.  Each <[[server]]> listens to TCP ports (usually HTTP).  The cluster defines a number of [virtual hosts].
  
 
===<[[http]]>===
 
===<[[http]]>===
  
The <[[http]]> tag tells Resin to listen to a HTTP port and interface.  
+
The <[[http]]> directive tells Resin to listen to a HTTP port and interface.  
  
  
Line 82: Line 82:
 
===<[[host]]>===
 
===<[[host]]>===
  
The <[[host]]> tag defines a [[virtual host|virtual hosts]].  The <[[host]]> tag is required, otherwise Resin will simply return [[404 Not Found]] messages.
+
The <[[host]]> directive defines a [[virtual host|virtual hosts]].  The <[[host]]> directive is required, otherwise Resin will simply return [[404 Not Found]] messages.
  
 
===[[root-directory]]===
 
===[[root-directory]]===
Line 92: Line 92:
 
===<[[web-app]]>===
 
===<[[web-app]]>===
  
The <[[web-app]]> tag defines a [[Web Application]].
+
The <[[web-app]]> directive defines a [[Web Application]].

Latest revision as of 20:47, 25 March 2008

The minimal resin.conf has a single virtual host and a single web-app. The web-app's directory is in -server-root/docs.

Contents

See Also

<resin> <server> <http> <server-id> <resin import> app-default.xml <host> <root-directory> <web-app> <document-directory>

minimal resin.conf

<resin xmlns="http://caucho.com/ns/resin"
       xmlns:resin="http://caucho.com/ns/resin/core">

  <log name="" level="info" path="stdout:"/>

  <cluster id="">
     <server id="">
        <http port="8080"/>
     </server>
 
    <resin:import path="${resin.home}/conf/app-default.xml"/>

    <host id="" root-directory=".">
      <web-app id="/" root-directory="docs"/>
    </host>
  </cluster>
</resin>

command line and -resin-root

unix> java -jar lib/resin.jar -resin-root /var/www -conf conf/resin.conf

The -resin-root argument specifies the main directory for the Resin instance. In this example, the document directory is in _/var/www/docs_.

As an alternative, either the <cluster> or the <host> can specify the actual <root-directory>, e.g. Template:Root-directory="/var/www". Using the command line adds some flexibility, but also makes the resin.conf more difficult to read as a standalone file.

description

<resin>

The <resin> directive is the top-level directive for the resin.conf.

xmlns and xmlns:resin

The xmlns and xmlns:resin directives define the XML namespaces for the resin.conf. These namespaces are important for the configuration file validation.

<cluster>

The <cluster> configures a Resin cluster, containing a number of servers. Each <server> listens to TCP ports (usually HTTP). The cluster defines a number of [virtual hosts].

<http>

The <http> directive tells Resin to listen to a HTTP port and interface.


<resin import>

The <resin import> imports a secondary XML file into the current configuration. In this case, the <resin:import> reads in the standard <[server]> configuration from [app-default.xml].

app-default.xml

app-default.xml is a critical import file which defines the JSP servlet, the file servlet, and defines WEB-INF/classes, WEB-INF/lib, WEB-INF/resin-web.xml and WEB-INF/web.xml.

Without the import of app-default.xml, most of the expected Web Application behavior will not occur.

<host>

The <host> directive defines a virtual hosts. The <host> directive is required, otherwise Resin will simply return 404 Not Found messages.

root-directory

The <root-directory> of a <host> specifies the virtual host's directory. If the path is relative, the root-directory will be relative to the <server> root-directory.

(If the <server> root-directory is unspecified, it defaults to -server-root.)

<web-app>

The <web-app> directive defines a Web Application.

Personal tools