virtualHost - Virtual Host (virtualHost)

A virtual host provides a logical grouping for configuring web applications to a particular host name. The default virtual host (default_host) is suitable for most simple configurations.

NameTypeDefaultDescription
idstringA unique configuration ID.
enabledbooleantrueEnable this virtual host.
allowFromEndpointRefList of references to top level httpEndpoint elements (comma-separated string).Specify the identifier of one or more HTTP endpoints to restrict inbound traffic for this virtual host to the specified endpoints.

hostAlias

Associate a host and port with this virtual host, using the host:port syntax. The specified host can be an IP address, domain name server (DNS) hostname with a domain name suffix, the DNS hostname, or * for a wildcard match on all hostnames. Note that IPv6 addresses must be enclosed in [].

allowFromEndpoint

Specify the identifier of one or more HTTP endpoints to restrict inbound traffic for this virtual host to the specified endpoints.

NameTypeDefaultDescription
idstringA unique configuration ID.
onError
  • IGNORE
  • WARN
  • FAIL
WARNAction to take after a failure to start an endpoint.
IGNORE
Server will not issue any warning and error messages when it incurs a configuration error.
WARN
Server will issue warning and error messages when it incurs a configuration error.
FAIL
Server will issue a warning or error message on the first error occurrence and then stop the server.
enabledbooleantrueToggle the availability of an endpoint. When true, this endpoint will be activated by the dispatcher to handle HTTP requests.
hoststringlocalhostIP address, domain name server (DNS) host name with domain name suffix, or just the DNS host name, used by a client to request a resource. Use '*' for all available network interfaces.
httpPortint
Min: -1

Max: 65535
The port used for client HTTP requests. Use -1 to disable this port.
httpsPortint
Min: -1

Max: 65535
The port used for client HTTP requests secured with SSL (https). Use -1 to disable this port.
httpOptionsRefA reference to top level httpOptions element (string).defaultHttpOptionsHTTP protocol options for the endpoint.
sslOptionsRefA reference to top level sslOptions element (string).SSL protocol options for the endpoint.
tcpOptionsRefA reference to top level tcpOptions element (string).defaultTCPOptionsTCP protocol options for the endpoint.
accessLoggingRefA reference to top level httpAccessLogging element (string).HTTP access logging configuration for the endpoint.

allowFromEndpoint > httpOptions

HTTP protocol options for the endpoint.

NameTypeDefaultDescription
keepAliveEnabledbooleantrueEnables persistent connections (HTTP keepalive). If true, connections are kept alive for reuse by multiple sequential requests and responses. If false, connections are closed after the response is sent.
maxKeepAliveRequestsint
Min: -1
100Maximum number of persistent requests that are allowed on a single HTTP connection if persistent connections are enabled. A value of -1 means unlimited.
persistTimeoutA period of time with second precision30sAmount of time that a socket will be allowed to remain idle between requests. This setting only applies if persistent connections are enabled. Specify a positive integer followed by a unit of time, which can be hours (h), minutes (m), or seconds (s). For example, specify 30 seconds as 30s. You can include multiple values in a single entry. For example, 1m30s is equivalent to 90 seconds.
readTimeoutA period of time with second precision60sAmount of time to wait for a read request to complete on a socket after the first read occurs. Specify a positive integer followed by a unit of time, which can be hours (h), minutes (m), or seconds (s). For example, specify 30 seconds as 30s. You can include multiple values in a single entry. For example, 1m30s is equivalent to 90 seconds.
writeTimeoutA period of time with second precision60sAmount of time to wait on a socket for each portion of the response data to be transmitted. Specify a positive integer followed by a unit of time, which can be hours (h), minutes (m), or seconds (s). For example, specify 30 seconds as 30s. You can include multiple values in a single entry. For example, 1m30s is equivalent to 90 seconds.
removeServerHeaderbooleanfalseRemoves server implementation information from HTTP headers and also disables the default Liberty profile welcome page.
NoCacheCookiesControlbooleantrueAllows the user to control whether or not the presence of a Set-Cookie header should update the Cache-Control header with a matching no-cache value. This also adds the Expires header.
AutoDecompressionbooleantrueSpecifies whether the HTTP Channel automatically decompresses incoming request body data.

allowFromEndpoint > sslOptions

SSL protocol options for the endpoint.

NameTypeDefaultDescription
sessionTimeoutA period of time with second precision1dAmount of time to wait for a read or write request to complete on a socket. This value is overridden by protocol-specific timeouts. Specify a positive integer followed by a unit of time, which can be hours (h), minutes (m), or seconds (s). For example, specify 30 seconds as 30s. You can include multiple values in a single entry. For example, 1m30s is equivalent to 90 seconds.
suppressHandshakeErrorsbooleanfalseDisable logging of SSL handshake errors. SSL handshake errors can occur during normal operation, however these messages can be useful when SSL is behaving unexpectedly.
sslRefA reference to top level ssl element (string).The default SSL configuration repertoire. The default value is defaultSSLSettings.
sslSessionTimeoutA period of time with millisecond precision8640msThe timeout limit for an SSL session that is established by the SSL Channel. Specify a positive integer followed by a unit of time, which can be hours (h), minutes (m), seconds (s), or milliseconds (ms). For example, specify 500 milliseconds as 500ms. You can include multiple values in a single entry. For example, 1s500ms is equivalent to 1.5 seconds.

allowFromEndpoint > tcpOptions

TCP protocol options for the endpoint.

NameTypeDefaultDescription
inactivityTimeoutA period of time with millisecond precision60sAmount of time to wait for a read or write request to complete on a socket. This value is overridden by protocol-specific timeouts. Specify a positive integer followed by a unit of time, which can be hours (h), minutes (m), seconds (s), or milliseconds (ms). For example, specify 500 milliseconds as 500ms. You can include multiple values in a single entry. For example, 1s500ms is equivalent to 1.5 seconds.
soReuseAddrbooleantrueEnables immediate rebind to a port with no active listener.
addressIncludeListstringA comma-separated list of addresses that are allowed to make inbound connections on this endpoint. You can specify IPv4 or IPv6 addresses. All values in an IPv4 or IPv6 address must be represented by a number or by an asterisk wildcard character.
addressExcludeListstringA comma-separated list of addresses that are not allowed to make inbound connections on this endpoint. You can specify IPv4 or IPv6 addresses. All values in an IPv4 or IPv6 address must be represented by a number or by an asterisk wildcard character.
hostNameIncludeListstringA comma-separated list of host names that are allowed to make inbound connections on this endpoint. Host names are not case-sensitive and can start with an asterisk, which is used as a wildcard character. However, asterisks cannot be elsewhere in the host name. For example, *.abc.com is valid, but *.abc.* is not valid.
hostNameExcludeListstringA comma-separated list of host names that are not allowed to make inbound connections on this endpoint. Host names are not case-sensitive and can start with an asterisk, which is used as a wildcard character. However, asterisks cannot be elsewhere in the host name. For example, *.abc.com is valid, but *.abc.* is not valid.

allowFromEndpoint > accessLogging

HTTP access logging configuration for the endpoint.

NameTypeDefaultDescription
enabledbooleantrueEnable access logging.
filePathPath to a file${server.output.dir}/logs/http_access.logDirectory path and name of the access log file. Standard variable substitutions, such as ${server.output.dir}, can be used when specifying the directory path.
logFormatstring%h %u %{t}W "%r" %s %bSpecifies the log format that is used when logging client access information.
maxFileSizeint
Min: 0
20Maximum size of a log file, in megabytes, before being rolled over; a value of 0 means no limit.
maxFilesint
Min: 0
2Maximum number of log files that will be kept, before the oldest file is removed; a value of 0 means no limit.