Sun Java System Application Server Platform Edition 9 Administration Reference

H

http-access-log

Defines an access log file for a virtual-server. The access-log subelement of the virtual server’s parent http-service element determines the access log file’s format and rotation settings.

Superelements

virtual-server

Subelements

none

Attributes

The following table describes attributes for the http-access-log element.

Table 1–53 http-access-log Attributes

Attribute 

Default 

Description 

log-directory

${com.sun.aas.instanceRoot}/logs/access

(optional) Specifies the location of the access log file. 

iponly

true

(optional) If true, specifies that only the IP address of the user agent is listed. If false, performs a DNL lookup.

http-file-cache

Configures the HTTP file cache.

Superelements

http-service

Subelements

none

Attributes

The following table describes attributes for the http-file-cache element.

Table 1–54 http-file-cache Attributes

Attribute 

Default 

Description 

globally-enabled

true

(optional) If true, enables the file cache.

file-caching-enabled

on

(optional) If on, enables caching of the file content if the file size exceeds the small-file-size-limit-in-bytes.

max-age-in-seconds

30

(optional) Specifies the maximum age of a file cache entry. 

medium-file-size-limit-in-bytes

537600

(optional) Specifies the maximum size of a file that can be cached as a memory mapped file. 

medium-file-space-in-bytes

10485760

(optional) Specifies the total size of all files that are cached as memory mapped files. 

small-file-size-limit-in-bytes

2048

(optional) Specifies the maximum size of a file that can be read into memory. 

small-file-space-in-bytes

1048576

(optional) Specifies the total size of all files that are read into memory. 

file-transmission-enabled

false

(optional) If true, enables the use of TransmitFileSystem calls. Meaningful only for Windows.

max-files-count

1024

(optional) Specifies the maximum number of files in the file cache. 

hash-init-size

0

(optional) Specifies the initial number of hash buckets. 

http-listener

Defines an HTTP listen socket.

Superelements

http-service

Subelements

The following table describes subelements for the http-listener element.

Table 1–55 http-listener Subelements

Element 

Required 

Description 

ssl

zero or one 

Defines Secure Socket Layer (SSL) parameters. 

property

zero or more 

Specifies a property or a variable. 

Attributes

The following table describes attributes for the http-listener element.

Table 1–56 http-listener Attributes

Attribute 

Default 

Description 

id

none 

The unique listener name. An http-listener name cannot begin with a number.

address

none 

IP address of the listener. Can be in dotted-pair or IPv6 notation. Can be any (for INADDR_ANY) to listen on all IP addresses. Can be a hostname.

port

none 

Port number on which the listener listens. Legal values are 1 - 65535. On UNIX, creating sockets that listen on ports 1 - 1024 requires superuser privileges. Configuring an SSL listener to listen on port 443 is standard.

acceptor-threads

1

(optional) Specifies the number of processors in the machine. The only legal value is 1.

To set the number of request processing threads, use the thread-count attribute of the request-processing element.

security-enabled

false

(optional) Determines whether the listener runs SSL. To turn SSL2 or SSL3 on or off and set ciphers, use an ssl subelement.

default-virtual-server

none 

References the id attribute of the default virtual-server for this particular listener.

server-name

none 

Tells the server what to put in the host name section of any URLs it sends to the client. This affects URLs the server automatically generates; it doesn’t affect the URLs for directories and files stored in the server. If your server uses an alias, the server-name should be the alias name.

If a colon and port number are appended, that port is used in URLs the server sends to the client. 

redirect-port

none 

(optional) If the listener is supporting non-SSL requests and a request is received for which a matching <security-constraint> requires SSL transport, the request is automatically redirected to the port number specified here.

xpowered-by

true

(optional) If true, X-Powered-By headers are used according to the Servlet 2.4 and JSP 2.0 specifications.

enabled

true

(optional) Determines whether the listener is active. 

Properties

The following table describes properties for the http-listener element. Any of these properties can be defined as an http-service property, so that it applies to all http-listener elements.

Table 1–57 http-listener Properties

Property 

Default 

Description 

recycle-objects

true

If true, recycles internal objects instead of using the VM garbage collector.

reader-threads

0

Specifies the number of reader threads, which read bytes from the non-blocking socket. 

acceptor-queue-length

4096

Specifies the length of the acceptor thread queue. Once full, connections are rejected. 

reader-queue-length

4096

Specifies the length of the reader thread queue. Once full, connections are rejected. 

use-nio-direct-bytebuffer

true

If true, specifies that the NIO direct ByteBuffer is used. In a limited resource environment, it might be faster to use non-direct Java's ByteBuffer by setting a value of false.

authPassthroughEnabled

false

If true, indicates that this http-listener element receives traffic from an SSL-terminating proxy server. Overrides the authPassthroughEnabled property of the parent http-service element.

proxyHandler

com.sun.enterprise.web.ProxyHandlerImpl

Specifies the fully qualified class name of a custom implementation of the com.sun.appserv.ProxyHandler abstract class that this http-listener uses.

Only used if the authPassthroughEnabled property of this http-listener and the parent http-service element are both set to true. Overrides the proxyHandler property of the parent http-service element.

bufferSize

4096

Specifies the size, in bytes, of the buffer to be provided for input streams created by HTTP listeners. 

connectionTimeout

12000 (12 seconds)

Specifies the number of milliseconds HTTP listeners wait, after accepting a connection, for the request URI line to be presented. 

maxKeepAliveRequests

1000

Specifies the maximum number of HTTP requests that can be pipelined until the connection is closed by the server. Set this property to 1 to disable HTTP/1.0 keep-alive, as well as HTTP/1.1 keep-alive and pipelining.

traceEnabled

true

If true, enables the TRACE operation. Set this property to false to make the Application Server less susceptible to cross-site scripting attacks.

http-service

Defines the HTTP service.

Superelements

config

Subelements

The following table describes subelements for the http-service element.

Table 1–58 http-service Subelements

Element 

Required 

Description 

access-log

zero or one 

Defines access log settings for each http-access-log subelement of each virtual-server.

http-listener

one or more 

Defines an HTTP listen socket. 

virtual-server

one or more 

Defines a virtual server. 

request-processing

zero or one 

Configures request processing threads. 

keep-alive

zero or one 

Configures keep-alive threads. 

connection-pool

zero or one 

Defines a pool of client HTTP connections. 

property

zero or more 

Specifies a property or a variable. 

Properties

The following table describes properties for the http-service element. These properties apply to all http-listener subelements, except for accessLogBufferSize and accessLogWriterInterval, which apply to all virtual-server subelements.

Table 1–59 http-service Properties

Property 

Default 

Description 

monitoring-cache-enabled

true

If true, enables the monitoring cache.

monitoring-cache-refresh-in-millis

5000

Specifies the interval between refreshes of the monitoring cache. 

ssl-cache-entries

10000

Specifies the number of SSL sessions to be cached. 

ssl3-session-timeout

86400

Specifies the interval at which SSL3 sessions are cached. 

ssl-session-timeout

100

Specifies the interval at which SSL2 sessions are cached. 

recycle-objects

true

If true, recycles internal objects instead of using the VM garbage collector.

reader-threads

0

Specifies the number of reader threads, which read bytes from the non-blocking socket. 

acceptor-queue-length

4096

Specifies the length of the acceptor thread queue. Once full, connections are rejected. 

reader-queue-length

4096

Specifies the length of the reader thread queue. Once full, connections are rejected. 

use-nio-direct-bytebuffer

true

If true, specifies that the NIO direct ByteBuffer is used. In a limited resource environment, it might be faster to use non-direct Java's ByteBuffer by setting a value of false.

authPassthroughEnabled

false

If true, indicates that the http-listener subelements receive traffic from an SSL-terminating proxy server, which is responsible for forwarding any information about the original client request (such as client IP address, SSL keysize, and authenticated client certificate chain) to the HTTP listeners using custom request headers.

Each http-listener subelement can override this setting for itself.

proxyHandler

com.sun.enterprise.web.ProxyHandlerImpl

Specifies the fully qualified class name of a custom implementation of the com.sun.appserv.ProxyHandler abstract class, which allows a back-end application server instance to retrieve information about the original client request that was intercepted by an SSL-terminating proxy server (for example, a load balancer). An implementation of this abstract class inspects a given request for the custom request headers through which the proxy server communicates the information about the original client request to the Application Server instance, and returns that information to its caller.

The default implementation reads the client IP address from an HTTP request header named Proxy-ip, the SSL keysize from an HTTP request header named Proxy-keysize, and the SSL client certificate chain from an HTTP request header named Proxy-auth-cert. The Proxy-auth-cert value must contain the BASE-64 encoded client certificate chain without the BEGIN CERTIFICATE and END CERTIFICATE boundaries and with \n replaced with % d% a.

Only used if authPassthroughEnabled is set to true. Each http-listener subelement can override the proxyHandler setting for itself.

bufferSize

4096

Specifies the size, in bytes, of the buffer to be provided for input streams created by HTTP listeners. 

connectionTimeout

12000 (12 seconds)

Specifies the number of milliseconds HTTP listeners wait, after accepting a connection, for the request URI line to be presented. 

maxKeepAliveRequests

1000

Specifies the maximum number of HTTP requests that can be pipelined until the connection is closed by the server. Set this property to 1 to disable HTTP/1.0 keep-alive, as well as HTTP/1.1 keep-alive and pipelining.

traceEnabled

true

If true, enables the TRACE operation. Set this property to false to make the Application Server less susceptible to cross-site scripting attacks.

accessLogBufferSize

32768

Specifies the size, in bytes, of the buffer where access log calls are stored. If the value is less than 5120, a warning message is issued, and the value is set to 5120.

accessLogWriterInterval

300

Specifies the number of seconds before the log is written to the disk. The access log is written when the buffer is full or when the interval expires. If the value is 0, the buffer is always written even if it is not full. This means that each time the server is accessed, the log message is stored directly to the file.