caucho
Resin
FAQ
Reference Guide
Demo
Tutorial

Getting Started
Configuration
IDE
Topics
JSP
XML/XSLT

Basic Config
Directory
Servlets
Filters
Resources
Databases
Messaging
Security Config
Log Config
Taglib Config
Misc resin.conf
Host resin.conf
Port resin.conf
App resin.conf
Summary
Glossary
Index
 Port and Protocol Configuration

Host resin.conf
Configuration
App resin.conf

Index
accept-buffer-sizeNumber of sockets in the accept buffer
dead-timeFor load balancing, how long the server should treat a dead server as dead before retrying it
hostSpecifies an interface for the http or srun to listen to
httpDefines a HTTP or SSL port for the standalone server
live-timeFor load balancing, how long the server should keep an idle srun connection open before closing it
portSpecifies the port the http or srun should listen to
request-timeoutTime in seconds for a connection to timeout
serverConfigures a custom protocol server
srunDefines multiple client machines for load balancing
srun-backupDefines backup client machines for load balancing
sslFlags a http or srun to use SSL
sslv2Enables or disables SSL v2 for a SSL port
sslv3Enables or disables SSL v3 for a SSL port
tcp-no-delaySets the tcpNoDelay for received sockets
tlsv1Enables or disables TLS v1 for a SSL port
verify-clientConfigures how SSL should treat client certificates

Port Configuration

accept-buffer-size

Number of sockets in the accept buffer.

Default: 256

http

Defines a HTTP or SSL port for the standalone server.

AttributeMeaning
idhttp identifier name
hostThe listening host
portThe listening port
virtual-hostVirtual host to select a host block.
sslenable ssl
ssl2enable SSLv2true
ssl3enable SSLv3true
tls1enable TLSv1true
key-store-typeJSSE Type of the key store (default jks)
key-store-fileJSSE File containing the certificates
key-store-passwordJSSE Password to read the certificates
certificate-chain-fileOpenSSL certificate chain (Resin 2.1.4)
certificate-fileOpenSSL certificate (Resin 2.0.5)
certificate-key-fileOpenSSL key certificate (Resin 2.0.5)
certificate-key-passwordOpenSSL key password (Resin 2.1.1)
crypto-deviceOpenSSL engine (Resin 2.0.5)
thread-maxMaximum number of live threads.200
thread-minMinimum number of live threads.5
thread-keepaliveNumber of keepalive threads100
request-timeoutMax time for a request, after this the request will be interrupted.65 sec
listenValue of the socket listen parameter5
accept-buffer-sizeNumber of sockets in the accept buffer.256
shutdown-wait-timeHow long to wait for connections to finish before exiting.10 sec.
Basic HTTP configuration
<caucho.com>
  <http-server>
    <http port='8080'>
    ...
  </http-server>
</caucho.com>
JSSE configuration
<caucho.com>
  <http-server>
    <http port='8443'>
      <ssl>true</ssl>
      <key-store-type>pkcs12</key-store-type>
      <key-store-file>keys/server.p12</key-store-file>
      <key-store-password>changeit</key-store-password>
    </http>
    ...
  </http-server>
</caucho.com>

dead-time

For load balancing, how long the server should treat a dead server as dead before retrying it.

Default: Defaults to 5 sec.

host

Specifies an interface for the http or srun to listen to. In cases where the server should not listen at all interfaces on a multihomed host, the <host> tag will restrict Resin to listen to one interface.

Default: listen to all interfaces.

live-time

For load balancing, how long the server should keep an idle srun connection open before closing it. <live-time> must be less than <request-timeout>.

Default: Defaults to 10 sec.

port

Specifies the port the http or srun should listen to. Most HTTP web servers listen to port 80.

request-timeout

Time in seconds for a connection to timeout. An idle client uses a TCP connection until it quits. request-timeout limits the time taken up by idle clients.

Default: Defaults to 65 sec.

server

Configures a custom protocol server. Some specialized application may have a custom protocol, like IMAP, which need to be integrated with the Resin server. These ports can be configured with the <server> configuration.

The <request-factory> class implements com.caucho.server.RequestFactory and creates request objects of type com.caucho.server.Request. Each Request will handle the protocol on the given socket.

<caucho.com>
  <http-server>
    <server id='a' port='9999'>
      <request-factory>com.trecorp.server.MyServer</request-factory>
      <init-param foo='bar'/>
    </server>
    ...
  </http-server>
</caucho.com>

srun

Defines multiple client machines for load balancing. This directive used by the web server (Apache or IIS) and by the Java portion of Resin.

Each srun directive adds a new client to receive load balanced requests. With Resin 1.2, the resin.conf must have at least one <srun> or <http> element.

AttributeMeaningDefault
idsrun identifier name.none
hostThe host name of the client srun.all interfaces
portThe port name of the client srun.none
connect-timeoutHow long to wait for a connection from the web server to the Resin srun before giving up.30 sec
live-timeHow long the web-server/srun connection should stay live.10 sec
dead-timeHow long before checking that a srun has come back up.5 sec
timeoutHow long the load balancing server should wait for a response.30 sec
thread-maxMaximum number of live threads.200
thread-minMinimum number of live threads.5
thread-keepaliveNumber of keepalive threads100
request-timeoutMax time for a request, after this the request will be interrupted.65 sec
listenValue of the socket listen parameter5
accept-buffer-sizeNumber of sockets in the accept buffer.256
shutdown-wait-timeHow long to wait for connections to finish before exiting.10 sec.
Load balance over three machines
<caucho.com>
  <http-server>
    <srun id='a' host='host1.caucho.com' port='6802'>
    <srun id='b' host='host2.caucho.com' port='6802'>
    <srun id='c' host='host2.caucho.com' port='6803'>
  </http-server>
</caucho.com>

To start srun 'a' use a command line like

unix> srun.sh -server a
Resin 2.1.0
srun listening to host1.caucho.com:6802

On Unix, when starting a daemon, you'll need to specify a unique pid file.

unix> srun.sh -server a -pid a.pid start

srun-backup

Defines backup client machines for load balancing. This directive is only picked up by the load balancer. The Java portion of Resin treats a <srun-backup> like any other srun. Normally, <srun-backup> is only used when each web server has a primary <srun> in preference to other <srun> JVMs. See the load-balancing section for more information.

AttributeMeaningDefault
idsrun identifier namenone
hostThe host name of the client srunall interfaces
portThe port name of the client srunnone
connect-timeoutHow long to wait for a connection from the web server to the Resin srun before giving up.30 sec
live-timeHow long a keepalive connection will remain alive before closing.5 sec.
dead-timeHow long to treat a non-responding srun before trying again.5 sec.
shutdown-wait-timeHow long to wait for connections to finish before exiting.10 sec.

ssl

Flags a http or srun to use SSL.

Resin supports SSL with either JSSE or OpenSSL on Unix systems. We generally recommend using ssl="openssl" since it's faster and more stable.

Resin's OpenSSL uses the same certificates as Apache, so you can either reuse your Apache certificate or get a new certificate using the instructions for getting an Apache certificate.

If you have OpenSSL-engine and Resin 2.0.5, you can enable SSL engines using the crypto-device tag. If the JNI libraries are available, Resin will use OpenSSL's C-based implementation.

AttributeMeaning
sslenable ssl ="jsse" or ="openssl"
key-store-typeJSSE Type of the key store (default jks)
key-store-fileJSSE File containing the certificates
key-store-passwordJSSE Password to read the certificates
certificate-chain-fileOpenSSL certificate chain (Resin 2.1.4)
certificate-fileOpenSSL certificate (Resin 2.0.5)
certificate-key-fileOpenSSL key certificate (Resin 2.0.5)
crypto-deviceOpenSSL engine (Resin 2.0.5)

<http-server>
  ...
  <http port='443'>
    <ssl>openssl</ssl>
    <certificate-file>/opt/resin/keys/cert.pem</certificate-file>
    <crypto-device>cswift</crypto-device>
  </http>
  ...
</http-server>

sslv2

Enables or disables SSL v2 for a SSL port. If sslv2 is false, clients trying to use SSL v2 will fail.

Default: true.

sslv3

Enables or disables SSL v3 for a SSL port. If sslv3 is false, clients trying to use SSL v3 will fail.

Default: true.

tcp-no-delay

Sets the tcpNoDelay for received sockets.

Default: true.

tlsv1

Enables or disables TLS v1 for a SSL port. If tlsv1 is false, clients trying to use TLS v1 will fail.

Default: true.

verify-client

Configures how SSL should treat client certificates.

verify-client values
ValueMeaning
noneDo not use client certificates
requireRequire a client certificate
optionalUse the client certificate if provided, but require any provided certificate to be signed by a known CA.
optional_no_caUse the client certificate if provided and accept certificates not signed by known CAs.

Default: none.


Host resin.conf
Configuration
App resin.conf
Copyright © 1998-2002 Caucho Technology, Inc. All rights reserved.
Resin® is a registered trademark, and HardCoretm and Quercustm are trademarks of Caucho Technology, Inc.