Sun Java System Application Server Enterprise Edition 8.1 2005Q2 Administration Guide

- Previous: About the HTTP Service
- Next: Admin Console Tasks for Virtual Servers

# Admin Console Tasks for the HTTP Service

- To configure the HTTP Service

- To configure the HTTP Service access log

## To configure the HTTP Service

1. In the tree component, expand the Configurations node.

2. Select the instance to configure:

   - To configure a particular instance, select the instance’s config node. For example, for the default instance, `server`, select the `server-config` node.

   - To configure the default settings for future instances that use a copy of `default-config`, select the `default-config` node.

3. Select the HTTP Service node.

4. On the HTTP Service page, you can set properties that apply to all of the service’s HTTP listeners.

   The following table lists these properties.

   Property Name | Description | Default Value
   --- | --- | ---
   `traceEnabled` | If set to true, enables the TRACE operation. Set this property to false to make the Application Server less susceptible to cross-site scripting attacks. | false
   `monitoringCacheEnabled` | If set to true, the Application Server caches local values of the statistics of the HTTP Service to answer statistics queries. This value improves performance. If set to false, the Application Server queries the HTTP Service for each statistics value. | true
   `monitoringCacheRefreshInMillis` | Specifies the time interval, in milliseconds, after which the monitoring cache is refreshed. | 5000
   `sslCacheEntries` | Specifies the number of SSL sessions that can be cached. There is no upper limit. | 10000
   `sslSessionTimeout` | Specifies the number of seconds before an SSL2 session times out. | 100
   `ssl3SessionTimeout` | Specifies the number of seconds before an SSL3 session times out. | 86400
   `sslClientAuthDataLimit` | Specifies the maximum amount of application data, in bytes, that is buffered during the client certificate handshake phase. | 1048576
   `sslClientAuthTimeout` | Specifies the number of seconds before the client certificate handshake phase times out. | 60
   `keepAliveQueryMeanTime` | Specifies the desired keep-alive latency (in milliseconds). | 100
   `keepAliveQueryMaxSleepTime` | Specifies the upper limit to the time slept (in milliseconds) after polling keep-alive connections for further requests. | 100
   `stackSize` | Specifies the maximum stack size of the native thread. | OS/Machine dependent
   `statsProfilingEnabled` | If set to false, disables the recording of monitoring statistics by the HTTP Service, which improves performance. If this property is set to false, enabling monitoring for the HTTP service has no effect. | true
   `chunkedRequestBufferSize` | Specifies the default buffer size, in bytes, for unchunking request data. | 8192
   `chunkedRequestTimeoutSeconds` | Specifies the default timeout (in seconds) for unchunking request data. | 60
   `dnsCacheEnabled` | If set to true, allows the user to monitor statistics related to DNS caching. This property takes effect only if the DNS Lookup box on the HTTP Protocol tab is selected. Otherwise, the property setting is ignored. | false

5. Click the Access Log tab to configure access log rotation.

   Click the other tabs to configure request processing, the Keep-Alive subsystem, the connection pool, the HTTP protocol, and the HTTP file cache.

6. Click Save.

## To configure the HTTP Service access log

Use this page to enable and configure rotation for the access logs for the virtual servers. These logs are in the domain-dir`/logs/access` directory and are named as follows: virtual-server-name`_access_log%YYYY;%MM;%DD-%hh;h%mm;m%ss;s`.

Click Default to load the default values.

1. Check the File Rotation box to turn on file rotation.

   By default, file rotation is enabled.

2. From the Rotation Policy drop-down list, choose a policy.

   The only policy available is `time`.

3. In the Rotation Interval field, type a numeric value to specify the number of minutes between rotations of the access log.

   This field is valid only if the Rotation Policy is `time`. The default is 1440 minutes.

4. In the Rotation Suffix field, type a string value to specify the suffix to be added to the log file name after rotation.

   The default is `%YYYY;%MM;%DD;-%hh;h%mm;m%ss;s`.

5. In the Format field, enter a string value to specify the format of the access log.

   Use the formats shown in the following table. The default format is `%client.name% %auth-user-name% %datetime% %request% %status% %response.length%`.

   Data | Token
   --- | ---
   Client Host Name | `%client.name%`
   Client DNS | `%client.dns%`
   System Date | `%datetime%`
   Full HTTP Request line | `%request%`
   Status | `%status%`
   Response Content Length | `%response.length%`
   Referer Header | `%header.referer%`
   User-agent | `%header.user-agent%`
   HTTP Method | `%http-method%`
   HTTP URI | `%http-uri%`
   HTTP Query String | `%query-str%`
   HTTP Protocol Version | `%http-version%`
   Accept Header | `%header.accept%`
   Date Header | `%header.date%`
   If-Modified-Since Header | `%header.if-mod-since%`
   Authorization Header | `%header.auth%`
   Any valid HTTP header value defined in RFC 2616 (`any` is also a valid header value; it is specified as a variable here) | `%header.`any`%`
   Name of Authorized User | `%auth-user-name%`
   Value of a Cookie | `%cookie.value%`
   Virtual Server ID | `%vs.id%`

6. Click Save to save the changes, or Load Defaults to return to the default settings.

## To configure HTTP Service request processing threads

1. Click Load Defaults to load the default values.

2. In the Thread Count field, type a numeric value to specify the maximum number of request processing threads.

   The default is 128.

3. In the Initial Thread Count field, type the number of request processing threads that will be available when the server starts.

   The default is 48.

4. In the Thread Increment field, type the number of request processing threads to be added when the number of requests exceeds the initial thread count.

   The default is 10.

5. In the Request Timeout field, type the number of seconds after which requests will time out.

   The default is 30 seconds.

6. In the Buffer Length field, type the size (in bytes) of the buffer used by the request processing threads to read the request data.

   The default is 4096 bytes.

7. Click Save to save the changes, or Load Defaults to return to the default settings.

## To configure the HTTP Service keep-alive subsystem

1. Click Load Defaults to load the default values.

2. In the Thread Count field, type the number of keep-alive threads to be used.

   The default is 1.

3. In the Max Connections field, type the maximum number of persistent connections to be maintained.

   The default is 256.

4. In the Time Out field, type the maximum number of seconds for which a keep-alive connection should be kept open.

   The default is 30 seconds.

5. Click Save to save the changes, or Load Defaults to return to the default settings.

## Configuring the HTTP Service Connection Pool

1. Click Load Defaults to load the default values.

2. In the Max Pending Count field, type the maximum number of pending connections to be allowed for an HTTP listener.

   The default that the Application Server software specifies is 4096.

   Note –

   The actual value for the default maximum pending count depends on the operating system. For example, for the Solaris operating system (OS), the default maximum pending count is determined by the `tcp_conn_req_max_q` kernel parameter of the TCP driver. The value of this parameter is 128. To determine the default maximum pending count on the Solaris OS, type the command `ndd /dev/tcp tcp_conn_req_max_q`.

3. In the Queue Size field, type the maximum number of outstanding connections the server can have

   The default is 4096.

4. In the Receive Buffer Size field, type the size of the receive buffer for an HTTP listener.

   The default is 4096.

5. In the Send Buffer Size field, type the size of the send buffer for an HTTP listener.

   The default is 8192.

6. Click Save to save the changes, or Load Defaults to return to the default settings.

## To configure the HTTP protocol for the HTTP Service

1. Click Load Defaults to load the default values.

2. In the Version field, type the version of the HTTP protocol to be used (`HTTP/1.0` or `HTTP/1.1`).

   The default is `HTTP/1.1`.

3. Select the DNS Lookup box to enable lookup of the DNS entry for the client.

   The default is false.

4. Remove the check from the SSL box to disable security in the server globally.

   Leave this value set to true to be able to use SSL for any listener that has security enabled. The default is true.

5. In the Forced Response Type field, type the response type to be used if there is no MIME mapping available matching the extension.

   The default value is `text/html; charset=iso-8859-1`.

6. In the Default Response Type field, type the default response type.

   The default value is `text/html; charset=iso-8859-1`. The value is a semicolon-delimited string consisting of content-type, encoding, language, and charset.

7. Click Save to save the changes, or Load Defaults to return to the default settings.

## To configure the HTTP file cache for the HTTP Service

The file cache stores static content so that the server handles requests for such content quickly.

1. Click Load Defaults to load the default values.

2. Check the Globally box to enable file caching.

   The default is true.

3. Check the File Transmission box to enable the use of the `TransmitFileSystem` method on Windows.

   The default is false.

4. In the Max Age field, type the maximum age, in seconds, of a valid cache entry.

   The default is 30 seconds.

5. In the Max Files Count field, type the maximum number of files in the file cache.

   The default is 1024.

6. In the Hash Init Size field, type the initial number of hash buckets.

   The default is zero.

7. In the Medium File Size Limit field, type the maximum size, in bytes, of a file that can be cached as a memory mapped file.

   The default is 537,600 bytes.

8. In the Medium File Size field, type the total size, in bytes, of all files that are cached as memory mapped files.

   The default is 10,485,760 bytes.

9. In the Small File Size Limit field, type the maximum size, in bytes, of a file that can be read into memory.

   The default is 2048 bytes.

10. In the Small File Size field, type the total size, in bytes, of all files that are read into memory.

    The default is 1,048,576 bytes.

11. Choose `ON` or `OFF` from the File Caching Enabled drop-down list to enable or disable caching of file content if the size of the file is less than the medium file size limit.

    The default is `ON`.

12. Click Save to save the changes, or Load Defaults to return to the default settings.

- Previous: About the HTTP Service
- Next: Admin Console Tasks for Virtual Servers

- © 2010, Oracle Corporation and/or its affiliates