| |
Miscellaneous Resin Configuration |
This section contains general, i.e. non-HTTP, configuration.
resin.conf is a general configuration file, like NT's registry.
Some Resin modules like logging have their configuration in
resin.conf, but outside the http-server block.
Configuration is based on element XML. The canonical form uses
elements only, like the Servlet 2.2 deployment descriptors.
To make the configuration more readable, you can use an attribute
as syntactic sugar for an element.
The following are equivalent:
<foo><bar>13</bar></foo> | canonical representation, but verbose
|
<foo bar=13/> | typical configuration
|
<foo><bar id=13/></foo> | Useful for a key-based list.
|
In general, the order is not important, but the nesting depth is.
In this reference guide, caucho.com/http-server/http/port refers to
a configuration like:
<caucho.com>
<http-server>
<http>
<port>80</port>
</http>
</http-server>
</caucho.com>
|
That example could be rewritten as:
<caucho.com>
<http-server>
<http port='80'/>
</http-server>
</caucho.com>
|
Includes another configuration file.
<caucho.com>
<http-server>
<host id='host1'>
<resin:include href='host.conf'/>
</host>
<host id='host2'>
<resin:include href='host.conf'/>
</host>
</http-server>
</caucho.com>
|
Includes files in a directory. All the files in the
directory named by the href and which have the given extension
will be inserted into the XML document.
<caucho.com>
<http-server>
<host id='host1'>
<resin:include-directory sub='host.conf' extension='.xml'/>
</host>
</http-server>
</caucho.com>
|
Configuration for the Java compiler. In general, we recommend
using IBM's jikes compiler because it's significantly faster than
the "internal" compiler.
Attribute | Meaning | Default
|
classpath | extra classpath (Resin 1.2.3) | none
|
compiler | Path to the java compiler or "internal" | internal
|
compiler-args | Extra args to pass to the compiler | none
|
encoding | Character encoding (Resin 1.2.4) | none
|
max-compile-time | Limits the time for a Java compilation (Resin 1.2.3) | 30 sec
|
<caucho.com>
<java compiler='/usr/local/bin/jikes'
compiler-args='-g'/>
...
</caucho.com>
|
The "internal" compiler is the default only because it's always available
for any JDK. The external jikes compiler is generally a preferred
configuration.
Debug log configuration. Most of Resin's code has debug logging
built in. The <log> configuration enables that logging, allowing
users to see what's going on. The debug logging can be useful when
trying to understand what HTTP requests and headers the browser is sending
or Resin is returning.
Attribute | Meaning | default
|
id | Name of debugging section | none
|
href | Destination file | none
|
timestamp | timestamp format | none
|
rollover-count | how many rotated (href.n) logs to keep. | 2
|
rollover-period | How often to rotate the log. | none
|
For example, to log everything to standard error use:
<caucho.com>
<log id='/' href='stderr:' timestamp="[%H:%M:%S.%s]"/>
</caucho.com>
|
log id value | Meaning
|
/ | Debug everything
|
/caucho.com/jsp | Debug jsp
|
/caucho.com/java | See all Java compilation
|
/caucho.com/xsl | XSL debugging
|
/caucho.com/tcp-server
| See thread creation and deletion
|
/caucho.com/sql
| See database pooling
|
/caucho.com/http
| HTTP related information
|
/caucho.com/http/session
| HTTP sessions
|
/caucho.com/distribution
| Distributed and persistent sessions
|
/caucho.com/http/cache
| Resin's proxy cache
|
The timestamp can include the following patterns:
Pattern | Meaning
|
%a | short weekday (mon, tue, ...)
|
%A | long weekday (Monday, Tuesday, ...)
|
%b | short month (Jan, Feb, ...)
|
%B | long month (January, February, ...)
|
%c | locale specific date
|
%d | day of month
|
%H | 24-hour
|
%I | 12-hour
|
%j | day of year
|
%m | month
|
%M | minute
|
%p | am/pm
|
%S | seconds
|
%s | milliseconds
|
%W | week of year
|
%w | day of week
|
%y | 2-digit year
|
%Y | 4-digit year
|
VFS mailto: configuration. The smtp.vfs configuration only
applies to the mailto: scheme in Resin's VFS. See the form mailing tutorial.
Attribute | Meaning | Default
|
host | SMTP host | localhost
|
port | SMTP port | 25
|
sender | sending mail address | The current user and local host
|
httpd and srun configuration.
Configures both http and srun. The
configuration is identical.
Sets the Unix group. To listen to port 80, Unix systems require Resin
to start as root. group-name lets the server change to a safer user after
listening to port 80.
<caucho.com>
<user-name>httpd</user-name>
<group-name>daemon</group-name>
</caucho.com>
|
Sets a Java system property. The effect is the same as if you
had called System.setProperty before starting Resin.
<caucho.com>
<system-property foo=bar/>
</caucho.com>
|
Adds a Java security provider without modifying the java.security.
<caucho.com>
<security-provider id='com.sun.net.ssl.internal.ssl.Provider'/>
</caucho.com>
|
Enables the a Java security manager. Normal configurations will
not use a security manager, because the security manager slows performance.
ISPs may want to add a security-manager to prevent some actions by
the clients.
By default, all web-apps have read/write/delete access
to the entire web-app.
<caucho.com>
<security-manager/>
...
</caucho.com>
|
Sets Unix user. To listen to port 80, Unix systems require Resin
to start as root. user-name lets the server change to a safer user after
listening to port 80.
<caucho.com>
<user-name>httpd</user-name>
<group-name>daemon</group-name>
</caucho.com>
|
You must use the bin/resin launcher to use user-name:
unix> bin/resin -conf conf/test.conf
|
caucho.com ::= java,
log*,
smtp.vfs,
user-name,
group-name,
system-property*,
security-provider,
security-manager,
http-server
java ::= compiler,
compiler-args,
encoding,
classpath
max-compile-time
log ::= href,
timestamp,
rollover-count,
rollover-period
|
Copyright © 1998-2002 Caucho Technology, Inc. All rights reserved.
Resin® is a registered trademark,
and HardCoretm and Quercustm are trademarks of Caucho Technology, Inc. | |
|