Skip navigation.
Downloads | Product Documentation | Support

WebLogic Server Configuration Reference

# VirtualHost

# Description

This bean represents the configuration of virtual web server within a weblogic server. Note that a server may define multiple web servers to support virtual hosts.

This MBean represents a virtual host.

# Syntax

>     <VirtualHost
>       AcceptContextPathInGetRealPath=( "true" | "false" )
>       AuthCookieEnabled=( "true" | "false" )
>       Charsets="java.util.Map"
>       ChunkedTransferDisabled=( "true" | "false" )
>       ClusteringEnabled=( "true" | "false" )
>       DefaultServerName="String"
>       DefaultWebApp="WebAppComponent name"
>       DeploymentOrder="number"
>       FrontendHTTPPort="number"
>       FrontendHTTPSPort="number"
>       FrontendHost="String"
>       HttpsKeepAliveSecs="number of seconds"
>       KeepAliveEnabled=( "true" | "false" )
>       KeepAliveSecs="number of seconds"
>       LogFileBufferKBytes="number of kilobytes"
>       LogFileCount="number"
>       LogFileFlushSecs="number of seconds"
>       LogFileFormat=( "common" | "extended" )
>       LogFileLimitEnabled=( "true" | "false" )
>       LogFileName="String"
>       LogRotationPeriodMins="number of minutes"
>       LogRotationTimeBegin="String"
>       LogRotationType=( "size" | "date" )
>       LogTimeInGMT=( "true" | "false" )
>       LoggingEnabled=( "true" | "false" )
>       MaxLogFileSizeKBytes="number of kilobytes"
>       MaxPostSize="number of bytes"
>       MaxPostTimeSecs="number of seconds"
>       Name="String"
>       Notes="String"
>       PostTimeoutSecs="number of seconds"
>       SendServerHeaderEnabled=( "true" | "false" )
>       SingleSignonDisabled=( "true" | "false" )
>       Targets="list of Target names"
>       URLResource="java.util.Map"
>       UseHeaderEncoding=( "true" | "false" )
>       UseHighestCompatibleHTTPVersion=( "true" | "false" )
>       VirtualHostNames="list of Strings"
>       WAPEnabled=( "true" | "false" )
>     />

# Parent Elements

- Domain

# Attributes

Table 71-1 VirtualHost attributes

Attribute | Description | Range of Values and Default
--- | --- | ---
AcceptContextPathInGetRealPath | Beginning with this release inclusion of the contextPath in the virtualPath to the context.getRealPath() will not be allowed as it breaks the case when the subdirectories have the same name as contextPath. In order to support applications which might have been developed according to the old behaviour we are providing a compatibility switch. This switchwill be deprecated in future releases. | Admin Console field label: Accept Context Path in Get Real Path Default: false
AuthCookieEnabled | Enables use of additional secure AuthCookie to make access to https pages with security constraints more secure. The session cookie will not be sufficient to gain access. Using this feature, the Web site designer can prevent session stealing. With this feature enabled, once you have logged in over https, the secure cookie is only sent encrypted over the network and therefore can never be stolen in transit. Therefore, a Web site designer can ensure that session stealing is not a problem by making all sensitive data require https. While the http session cookie (JSESSIONID) is still vulnerable to being stolen and used, all sensitive operations require the secure AuthCookie (_wl_authcookie_ cookie), which cannot be stolen, so those operations are protected. Note: Prior to Service Pack 5, this feature requires that a browser uses cookies. If a browser does not support cookies and this feature is enabled, a user will not be able to log in over HTTPS. However, if Service Pack 5 is installed, this feature will work even when cookies are disabled; WebLogic Server will use URL rewriting over secure connections to rewrite secure URLs in order to encode the authCookieID in the URL along with the JSESSIONID. | Default: true Secure value: true
Charsets | User defined mapping between internet and Java charset names | Required: no
ChunkedTransferDisabled | Disables the use of Chunk Transfer-Encoding in HTTP/1.1 | Default: false
ClusteringEnabled | Enables HTTP clustering | Default: false Secure value: false
DefaultServerName | Sets the HTTP defaultServerName | Admin Console field label: Default Server Name Required: no
DefaultWebApp | Servlet 2.3 Web Application that maps to the "default" servlet context (where ContextPath = "/"). This param is being deprecated starting from 8.1 release. Set context-root="/" instead in weblogic.xml or application.xml. | Admin Console field label: Default Web App Required: no
DeploymentOrder | A priority that the server uses to determine when it deploys an item. The priority is relative to other deployable items of the same type. For example, the server prioritizes and deploys all EJBs before it prioritizes and deploys startup classes. Items with the lowest Deployment Order value are deployed first. There is no guarantee on the order of deployments with equal Deployment Order values. There is no guarantee of ordering across clusters. | Default: 1000 Minimum: 0 Maximum: 231-1
FrontendHTTPPort | Sets the frontendHTTPPort Provides a method to ensure that the webapp will always have the correct PORT information, even when the request is coming through a firewall or a proxy. If this parameter is configured, the HOST header will be ignored and the information in this parameter will be used in its place. | Default: 0
FrontendHTTPSPort | Sets the frontendHTTPSPort Provides a method to ensure that the webapp will always have the correct PORT information, even when the request is coming through a firewall or a proxy. If this parameter is configured, the HOST header will be ignored and the information in this parameter will be used in its place. | Default: 0
FrontendHost | Sets the HTTP frontendHost Provides a method to ensure that the webapp will always have the correct HOST information, even when the request is coming through a firewall or a proxy. If this parameter is configured, the HOST header will be ignored and the information in this parameter will be used in its place. | Required: no
HttpsKeepAliveSecs | Number of seconds to maintain HTTPS keep-alive before timing out the request. | Admin Console field label: HTTPS Duration Units: seconds Default: 60 Secure value: 60 Minimum: 30 Maximum: 360
KeepAliveEnabled | Returns whether or not HTTP keep-alive is enabled | Admin Console field label: Enable Keepalives Default: true Secure value: true
KeepAliveSecs | Number of seconds to maintain HTTP keep-alive before timing out the request. | Admin Console field label: Duration Units: seconds Default: 30 Secure value: 30 Minimum: 5 Maximum: 300
LogFileBufferKBytes | The maximum size (in kilobytes) of the buffer that stores HTTP requests. When the buffer reaches this size, the server writes the data to the HTTP log file. Use the `LogFileFlushSecs` property to determine the frequency with which the server checks the size of the buffer. | Admin Console field label: File Buffer Size Units: kilobytes Default: 8 Minimum: 0 Maximum: 1024
LogFileCount | The maximum number of log files that the server creates when it rotates the log. Only valid if `isLogFileLimitEnabled` is true and `setLogRotationType` is either `Size` or `Time`. | Default: 7 Minimum: 1 Maximum: 9999
LogFileFlushSecs | The interval (in seconds) at which the server checks the size of the buffer that stores HTTP requests. When the buffer exceeds the size that is specified in the `LogFileBufferKBytes` property, the server writes the data in the buffer to the HTTP request log file. | Admin Console field label: File Flush Secs Units: seconds Default: 60 Minimum: 1 Maximum: 360
LogFileFormat | Specifies the format of the HTTP log file. Both formats are defined by the W3C. With the extended log format, you use server directives in the log file to customize the information that the server records. | Admin Console field label: File Format Required: no Default: common
LogFileLimitEnabled | Indicates whether a server will limit the number of log files that it creates when it rotates the log. The limit is based on `getLogFileCount`. | Default: false
LogFileName | The name of the file that stores the HTTP-request log. If the pathname is not absolute, the path is assumed to be relative to the server's root directory. This value is relevant only if HTTP logging is enabled. The current logfile is always the one whose name equals value of the this attribute. If you have enabled log file rotation, when the current file exceeds the size or time limit, it is renamed. To include a time and date stamp in the file name when the log file is rotated, add `java.text.SimpleDateFormat` variables to the file name. Surround each variable with percentage (`%`) characters. For example, if the file name is defined to be `access_%yyyy%_%MM%_%dd%_%hh%_%mm%.log`, the log file will be named `access_yyyy_mm_dd_hh_mm.log`. When the log file is rotated, the rotated file name contains the date stamp. For example, if the log file is rotated on 2 April, 2003 at 10:05 AM, the log file that contains the old messages will be named `access_2003_04_02_10_05.log`. If you do not include a time and date stamp, the rotated log files are numbered in order of creation. For example, `access.log0007`. | Admin Console field label: File Name Required: no Default: access.log
LogRotationPeriodMins | The interval (in minutes) at which the server saves old HTTP requests to another log file. This value is relevant only if you use the `date`-based rotation type. | Admin Console field label: Rotation Period Mins Units: minutes Default: 1440 Minimum: 1 Maximum: 231-1
LogRotationTimeBegin | Determines the start time for a time-based rotation sequence. At the time that this value specifies, the server renames the current log file. Thereafter, the server renames the log file at an interval that you specify in `LogRotationPeriodMins`. Use the following format: `MM-dd-yyyy-k:mm:ss` where `MM` is the month as expressed in the Gregorian calendar `dd` is the day of the month `yyyy` is the year `k` is the hour in a 24-hour format. `mm` is the minute `ss` is the second If the time that you specify is already past, the server calculates the initial rotation time based on the rotation start time and the rotation period. For example, if you specify Rotation Time 08-03-2004-15:30:00, Rotation Period 10 minutes, and start WebLogic Server at 08-03-2004-15:45:00, the server calculates the initial rotation start time as 15:30 + (10 * 2) minutes, and starts the file rotation at 15:50. By default, rotation starts based on the time that you restart the server instance plus the rotation period. | Admin Console field label: Rotation Time Begin Required: no
LogRotationType | Criteria for moving old HTTP requests to a separate log file: `size` . When the log file reaches the size that you specify in `MaxLogFileSizeKBytes`, the server renames the file as LogFileName.n. `date` . At each time interval that you specify in `LogRotationPeriodMin`, the server renames the file as LogFileName.n. After the server renames a file, subsequent messages accumulate in a new file with the name that you specified in `LogFileName`. | Admin Console field label: Rotation Type Required: no Default: size
LogTimeInGMT | Specifies whether the time stamps for HTTP log messages are in Greenwich Mean Time (GMT) regardless of the local time zone that the host computer specifies. Use this method to comply with the W3C specification for Extended Format Log Files. The specification states that all time stamps for Extended Format log entries be in GMT. This method applies only if you have specified the `extended` message format. | Default: false
LoggingEnabled | Enables logging of HTTP requests. | Admin Console field label: Logging Enabled Default: true Secure value: true
MaxLogFileSizeKBytes | The size (1 - 65535 kilobytes) that triggers the server to move log messages to a separate file. After the log file reaches the specified size, the next time the server checks the file size, it will rename the current log file as FileName.n and create a new one to store subsequent messages. `0` causes the file to grow indefinitely. This property is relevant only if you choose to rotate files by `size`. | Admin Console field label: Maximum Log File Size Units: kilobytes Default: 5000 Minimum: 0
MaxPostSize | Max Post Size (in bytes) for reading HTTP POST data in a servlet request. MaxPostSize < 0 means unlimited | Admin Console field label: Max Post Size Units: bytes Default: -1
MaxPostTimeSecs | Max Post Time (in seconds) for reading HTTP POST data in a servlet request. MaxPostTime < 0 means unlimited | Admin Console field label: Max Post Time Units: seconds Default: -1
Name | The name of this configuration. WebLogic Server uses an MBean to implement and persist the configuration. | Admin Console field label: Name Required: no
Notes | Optional information that you can include to describe this configuration. | Admin Console field label: Notes Required: no
PostTimeoutSecs | Timeout (in seconds) for reading HTTP POST data in a servlet request. | Admin Console field label: Post Timeout Units: seconds Default: 30 Secure value: 30 Minimum: 0 Maximum: 120
SendServerHeaderEnabled | Determines whether this server instance includes its name and WebLogic Server version number in HTTP response headers. Providing this information poses a potential security risk if an attacker knows about some vulnerability in a specific version of WebLogic Server. | Default: false Secure value: false
SingleSignonDisabled | Disables SingleSignon in webapps | Default: false
Targets | The targets in the current domain on which this item can be deployed. | Admin Console field label: Targets Required: no
URLResource | Adds a URL connection factory resource into JNDI | Required: no
UseHeaderEncoding | Enables use of Content-Type encoding for specific headers that are known to contain non-ISO-8859_1 characters. | Default: false Secure value: false
UseHighestCompatibleHTTPVersion | Enables use of the highest compatible HTTP protocol version-string in the response. E.g. HTTP spec suggests that HTTP/1.1 version-string should be used in response to a request using HTTP/1.0. This does not necessarily affect the response format. | Default: true
VirtualHostNames | Returns the host name for which this web server will serve requests. | Admin Console field label: Virtual Host Names Required: no
WAPEnabled | Enables WAP | Admin Console field label: WAP Enabled Default: false