Minimal.conf
From Resin 3.0
(renamed tag to directive) |
|||
Line 30: | Line 30: | ||
<log name="" level="info" path="stdout:"/> | <log name="" level="info" path="stdout:"/> | ||
− | < | + | <cluster id=""> |
− | + | <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="/" | + | <web-app id="/" root-directory="docs"/> |
</host> | </host> | ||
− | </ | + | </cluster> |
</resin> | </resin> | ||
− | ==command line and - | + | ==command line and -resin-root== |
− | unix> | + | unix> java -jar lib/resin.jar -resin-root /var/www -conf conf/resin.conf |
− | The [[- | + | 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 <[[ | + | 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 59: | Line 61: | ||
The xmlns and xmlns:resin directives 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. | ||
− | ===<[[ | + | ===<[[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]]>=== | ===<[[http]]>=== |
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 |
[edit] See Also
<resin> <server> <http> <server-id> <resin import> app-default.xml <host> <root-directory> <web-app> <document-directory>
[edit] 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>
[edit] 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.
[edit] description
[edit] <resin>
The <resin> directive is the top-level directive for the resin.conf.
[edit] 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.
[edit] <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].
[edit] <http>
The <http> directive tells Resin to listen to a HTTP port and interface.
[edit] <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].
[edit] 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.
[edit] <host>
The <host> directive defines a virtual hosts. The <host> directive is required, otherwise Resin will simply return 404 Not Found messages.
[edit] 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.)
[edit] <web-app>
The <web-app> directive defines a Web Application.