Minimal.conf
From Resin 3.0
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:"/> <server> <http server-id="" host="*" port="8080"/> <resin:import path="${resin.home}/conf/app-default.xml"/> <host id="" root-directory="."> <web-app id="/" document-directory="docs"/> </host> </server> </resin>
command line and -server-root
unix> bin/httpd.sh -server-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_.
As an alternative, either the <server> 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> tag is the top-level tag for the resin.conf.
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.
<server>
The <server> configures a Resin server. Each <server> listens to TCP ports (usually HTTP) and defines a number of [virtual hosts].
Although it is possible to have multiple <server> items, most sites will only use a single <server>.
<http>
The <http> tag 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> tag defines a virtual hosts. The <host> tag 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> tag defines a Web Application.