📄 port-config.xtp
字号:
<s1 title="Port and Protocol Configuration"><objsummary/><s2 title='Port Configuration'><defun title='accept-buffer-size' version="Resin 1.2"><p>Number of sockets in the accept buffer.</p><p><b>Default:</b> 256</p></defun><defun title='http' version="Resin 1.2"><p>Defines a HTTP or SSL port for the standalone server.</p><deftable><tr><th>Attribute<th>Meaning<tr><td>id<td>http identifier name<tr><td>host<td>The listening host<tr><td>port<td>The listening port<tr><td>virtual-host<td>Virtual host to select a <a href="#host">host</a> block.<tr><td>ssl<td>enable ssl<tr><td>ssl2<td>enable SSLv2<td>true<tr><td>ssl3<td>enable SSLv3<td>true<tr><td>tls1<td>enable TLSv1<td>true<tr><td>key-store-type<td>JSSE Type of the key store (default jks)<tr><td>key-store-file<td>JSSE File containing the certificates<tr><td>key-store-password<td>JSSE Password to read the certificates<!--<tr><td>ca-certificate-path<td>OpenSSL CA certificate path (Resin 2.1.4)<tr><td>ca-certificate-file<td>OpenSSL CA certificate path (Resin 2.1.4)<tr><td>ca-revocation-path<td>OpenSSL CA revocation path (Resin 2.1.4)<tr><td>ca-revocation-file<td>OpenSSL CA revocation path (Resin 2.1.4)--><tr><td>certificate-chain-file<td>OpenSSL certificate chain (Resin 2.1.4)<tr><td>certificate-file<td>OpenSSL certificate (Resin 2.0.5)<tr><td>certificate-key-file<td>OpenSSL key certificate (Resin 2.0.5)<tr><td>certificate-key-password<td>OpenSSL key password (Resin 2.1.1)<tr><td>crypto-device<td>OpenSSL engine (Resin 2.0.5)<tr><td>thread-max<td>Maximum number of live threads.<td>200<tr><td>thread-min<td>Minimum number of live threads.<td>5<tr><td>thread-keepalive<td>Number of keepalive threads<td>100<tr><td>request-timeout<td>Max time for a request, after this the requestwill be interrupted.<td>65 sec<tr><td>listen<td>Value of the socket listen parameter<td>5<tr><td>accept-buffer-size<td>Number of sockets in the accept buffer.<td>256<tr><td>shutdown-wait-time<td>How long to wait for connections tofinish before exiting.<td>10 sec.</deftable><example title='Basic HTTP configuration'><caucho.com> <http-server> <http port='8080'> ... </http-server></caucho.com></example><example title='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></example></defun><defun title="dead-time"><p>For load balancing, how long the server should treat a dead serveras dead before retrying it.</p><p><b>Default:</b> Defaults to 5 sec.</p></defun><defun title="host" version="Resin 1.2"><p>Specifies an interface for the http or srun to listen to.In cases where the server should not listen at all interfaces on amultihomed host, the <host> tag will restrict Resin to listen toone interface.</p><p><b>Default:</b> listen to all interfaces.</p></defun><defun title="live-time"><p>For load balancing, how long the server should keep anidle srun connection open before closing it. <live-time> must be lessthan <request-timeout>.</p><p><b>Default:</b> Defaults to 10 sec.</p></defun><defun title='port' version="Resin 1.2"><p>Specifies the port the http or srun should listen to.Most HTTP web servers listen to port 80.</p></defun><defun title='request-timeout'><p>Time in seconds for a connection to timeout. An idle clientuses a TCP connection until it quits. <var/request-timeout/> limitsthe time taken up by idle clients.</p><p><b>Default:</b> Defaults to 65 sec.</p></defun><defun title="server" version="Resin 2.0"><p>Configures a custom protocol server. Some specializedapplication may have a custom protocol, like IMAP, which need tobe integrated with the Resin server. These ports can be configuredwith the <server> configuration.</p><p>The <request-factory> class implements<code/com.caucho.server.RequestFactory/> and creates request objectsof type <code/com.caucho.server.Request/>. Each <code/Request/> willhandle the protocol on the given socket.</p><example><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></example></defun><defun title='srun' version='Resin 1.1'><p>Defines multiple client machines for load balancing. Thisdirective used by the web server (Apache or IIS) and by the Java portionof Resin.</p><p>Each <var/srun/> directive adds a new client to receive loadbalanced requests. With Resin 1.2, the resin.conf must have at leastone <srun> or <http> element.</p><deftable><tr><th>Attribute<th>Meaning<th>Default<tr><td>id<td>srun identifier name.<td>none<tr><td>host<td>The host name of the client srun.<td>all interfaces<tr><td>port<td>The port name of the client srun.<td>none<tr><td>connect-timeout<td>How long to wait for a connection from theweb server to the Resin srun before giving up.<td>30 sec<tr><td>live-time<td>How long the web-server/srun connection should stay live.<td>10 sec<tr><td>dead-time<td>How long before checking that a srun has come back up.<td>5 sec<tr><td>timeout<td>How long the load balancing server should wait for a response.<td>30 sec<tr><td>thread-max<td>Maximum number of live threads.<td>200<tr><td>thread-min<td>Minimum number of live threads.<td>5<tr><td>thread-keepalive<td>Number of keepalive threads<td>100<tr><td>request-timeout<td>Max time for a request, after this the requestwill be interrupted.<td>65 sec<tr><td>listen<td>Value of the socket listen parameter<td>5<tr><td>accept-buffer-size<td>Number of sockets in the accept buffer.<td>256<tr><td>shutdown-wait-time<td>How long to wait for connections tofinish before exiting.<td>10 sec.</deftable><example title='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></example><p>To start srun 'a' use a command line like</p><example>unix> <var/srun.sh -server a/>Resin 2.1.0srun listening to host1.caucho.com:6802</example><p>On Unix, when starting a daemon, you'll need to specify a unique pid file.</p><example>unix> <var/srun.sh -server a -pid a.pid start/></example></defun><defun title='srun-backup' version='Resin 1.1'><p>Defines backup client machines for load balancing. Thisdirective is only picked up by the load balancer. TheJava portion of Resin treats a <srun-backup> like any other srun.Normally, <srun-backup> is only used when each web server hasa primary <srun> in preference to other <srun> JVMs.See the <a href="balance.xtp">load-balancing</a> sectionfor more information.</p><deftable><tr><th>Attribute<th>Meaning<th>Default<tr><td>id<td>srun identifier name<td>none<tr><td>host<td>The host name of the client srun<td>all interfaces<tr><td>port<td>The port name of the client srun<td>none<tr><td>connect-timeout<td>How long to wait for a connection from theweb server to the Resin srun before giving up.<td>30 sec<tr><td>live-time<td>How long a keepalive connection will remain alive beforeclosing.<td>5 sec.<tr><td>dead-time<td>How long to treat a non-responding srun before trying again.<td>5 sec.<tr><td>shutdown-wait-time<td>How long to wait for connections tofinish before exiting.<td>10 sec.</deftable></defun><defun title="ssl" version="Resin 1.2"><p>Flags a http or srun to use SSL.</p><p>Resin supports SSL with either JSSE or OpenSSL on Unix systems.We generally recommend using ssl="openssl" since it's faster and more stable.</p><p>Resin's OpenSSL uses the same certificates as Apache, so you caneither reuse your Apache certificate or get a new certificate using theinstructions for getting an Apache certificate.</p><p>If you have OpenSSL-engine and Resin 2.0.5, you can enableSSL engines using the crypto-device tag. If the JNI libraries are available,Resin will use OpenSSL's C-based implementation.</p><deftable><tr><th>Attribute<th>Meaning<tr><td>ssl<td>enable ssl ="jsse" or ="openssl"<tr><td>key-store-type<td>JSSE Type of the key store (default jks)<tr><td>key-store-file<td>JSSE File containing the certificates<tr><td>key-store-password<td>JSSE Password to read the certificates<tr><td>certificate-chain-file<td>OpenSSL certificate chain (Resin 2.1.4)<tr><td>certificate-file<td>OpenSSL certificate (Resin 2.0.5)<tr><td>certificate-key-file<td>OpenSSL key certificate (Resin 2.0.5)<tr><td>crypto-device<td>OpenSSL engine (Resin 2.0.5)</deftable><example><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></example></defun><defun title="sslv2" version="Resin 2.1.1"><p>Enables or disables SSL v2 for a SSL port.If sslv2 is false, clients tryingto use SSL v2 will fail.</p><p><b>Default:</b> true.</p></defun><defun title="sslv3" version="Resin 2.1.1"><p>Enables or disables SSL v3 for a SSL port.If sslv3 is false, clients trying to use SSL v3 will fail.</p><p><b>Default:</b> true.</p></defun><defun title='tcp-no-delay' version='Resin 2.1.6'><p>Sets the tcpNoDelay for received sockets.</p><p><b>Default:</b> true.</p></defun><defun title="tlsv1" version="Resin 2.1.1"><p>Enables or disables TLS v1 for a SSL port.If tlsv1 is false, clients trying to use TLS v1 will fail.</p><p><b>Default:</b> true.</p></defun><defun title="verify-client" version="Resin 2.1.2"><p>Configures how SSL should treat client certificates.</p><deftable title="verify-client values"><tr><th>Value<th>Meaning<tr><td>none<td>Do not use client certificates<tr><td>require<td>Require a client certificate<tr><td>optional<td>Use the client certificate if provided, but require any provided certificate to be signed by a known CA.<tr><td>optional_no_ca<td>Use the client certificate if provided and accept certificates not signed by known CAs.</deftable><p><b>Default:</b> none.</p></defun></s2></s1>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -