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

allowFromEndpointRef

List 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.

enabled

boolean

true

Enable this virtual host.

hostAlias

string

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 [].

id

string

A unique configuration ID.

virtualHost > allowFromEndpoint

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

NameTypeDefaultDescription

accessLoggingRef

A reference to top level httpAccessLogging element (string).

HTTP access logging configuration for the endpoint.

compressionRef

A reference to top level compression element (string).

defaultCompression

Compression options for the endpoint.

enabled

boolean

true

Toggle the availability of an endpoint. When true, this endpoint will be activated by the dispatcher to handle HTTP requests.

headersRef

A reference to top level headers element (string).

defaultHeaders

Header options for the endpoint.

host

string

localhost

IP 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.

httpOptionsRef

A reference to top level httpOptions element (string).

defaultHttpOptions

HTTP protocol options for the endpoint.

httpPort

int
Min: -1
Max: 65535

The port used for client HTTP requests. Use -1 to disable this port.

httpsPort

int
Min: -1
Max: 65535

The port used for client HTTP requests secured with SSL (https). Use -1 to disable this port.

id

string

A unique configuration ID.

onError

  • FAIL

  • IGNORE

  • WARN

WARN

Action to take after a failure to start an endpoint.
FAIL
Server will issue a warning or error message on the first error occurrence and then stop the server.
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.

protocolVersion

string

When Servlet 4.0 API is enabled as a feature, set this attribute to http/1.1 to disable HTTP/2 processing for the ports that were defined for the httpEndpoint element. When Servlet 3.1 API is enabled as a feature, set this attribute to http/2 to enable HTTP/2 processing for the ports that are defined for the httpEndpoint element.

remoteIpRef

A reference to top level remoteIp element (string).

defaultRemoteIp

Remote IP options for the endpoint.

samesiteRef

A reference to top level samesite element (string).

defaultSameSite

SameSite options for the endpoint.

sslOptionsRef

A reference to top level sslOptions element (string).

SSL protocol options for the endpoint.

tcpOptionsRef

A reference to top level tcpOptions element (string).

defaultTCPOptions

TCP protocol options for the endpoint.

Expand
virtualHost > allowFromEndpoint > accessLogging

HTTP access logging configuration for the endpoint.

Expand
virtualHost > allowFromEndpoint > compression

Compression options for the endpoint.

Expand
virtualHost > allowFromEndpoint > headers

Header options for the endpoint.

Expand
virtualHost > allowFromEndpoint > httpOptions

HTTP protocol options for the endpoint.

Expand
virtualHost > allowFromEndpoint > remoteIp

Remote IP options for the endpoint.

Expand
virtualHost > allowFromEndpoint > samesite

SameSite options for the endpoint.

Expand
virtualHost > allowFromEndpoint > sslOptions

SSL protocol options for the endpoint.

Expand
virtualHost > allowFromEndpoint > tcpOptions

TCP protocol options for the endpoint.