Minimal.conf

From Resin 3.0

Jump to: navigation, search

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