setBPMVirtualHost command
The setBPMVirtualHost command is run using the AdminTask object of the wsadmin scripting client.
Prerequisites
The following conditions must be met:
- In a network deployment environment, run the command on the deployment manager node. In a single-server environment, run the command on the stand-alone server.
- If the deployment manager or stand-alone server is stopped, use the wsadmin -conntype none option to run the command in disconnected mode (which is the recommended mode for this command).
- If the deployment manager or stand-alone server is running, you must connect with a user ID that has WebSphere Application Server configurator privileges. Do not use the wsadmin -conntype none option.
Location
Start the wsadmin scripting client from the profile_root/bin directory. The setBPMVirtualHost command does not write to a log file, but the wsadmin scripting client always writes a profile_root/logs/wsadmin.traceout log file where you will find exception stack traces and other information.
Syntax
setBPMVirtualHost
[-de deployment_environment_name]
-name virtual_host_name
[-transportProtocol virtual_host_transport_protocol]
[-hostname virtual_host_hostname]
[-port virtual_host_port]
[-uriPrefix virtual_host_URI_prefix]
Parameters
- -de deployment_environment_name
- A parameter that specifies the name of the current deployment environment. If there is only one deployment environment in the WebSphere cell, you can omit this parameter.
- -name virtual_host_name
- A required parameter that specifies the name of a new virtual host that you want to create or the name of an existing virtual host that you want to update.
- -transportProtocol virtual_host_transport_protocol
- An optional parameter that specifies the transport protocol for the virtual host. The default value is https.
- -hostname virtual_host_hostname
- An optional parameter that specifies the host name for the virtual host. If you are modifying an existing virtual host, you can omit the -hostname parameter. However, if you are creating a new virtual host, you must specify the parameter. By default, the parameter is unset.
- -port virtual_host_port
- An optional parameter that specifies the port number for the virtual
host. This parameter should only be used to specify a port that is
not the default port for the specified protocol. For example, if the
specified protocol is https, then this parameter
should only be used to specify a port that is not the default port 443.
The default value is -1. If the default value -1 is
set, the generated URLs will use the default port number for the specified
protocol (which is 80 for HTTP and 443 for
HTTPS).
If the port parameter value is -1 or the actual default port number for the specified protocol, the port number is not included in the generated URL. For example, the generated URL would be https://my_host/ProcessCenter rather than the URL https://my_host:443/ProcessCenter.
- -uriPrefix virtual_host_URI_prefix
- An optional parameter that specifies the URI prefix for the virtual host. This parameter is typically only used when you have an intermediate networking device between the client and server that requires a URI prefix to be added to client requests. By default, this parameter is unset. If a value is set, then it will be included between the port and context root for a URL (as shown in the examples). If the configured URI prefix does not include a leading forward slash character (/), then the character will be added.
Examples
- The following Jython example uses the setBPMVirtualHost command
to reset the existing value for the uriPrefix parameter:
AdminTask.setBPMVirtualHost( [ '-name', 'myVirtualHost', '-uriPrefix' ] )
- The following Jython example uses the setBPMVirtualHost command
to create or update a virtual host:
wsadmin -user admin -password admin -lang jython wsadmin>AdminTask.setBPMVirtualHost(['-de', 'De1', '-name', 'myVirtualHost', '-transportProtocol', 'https', '-hostname', 'myHostName', '-port', '9443', '-uriPrefix', 'myURIPrefix']) wsadmin>AdminConfig.save()
When the virtual host created by the above command syntax is used in the Process Center web module lookup, the following URL is the result:
https://myHostName:9443/myURIPrefix/ProcessCenter
- The following Jython example uses the setBPMVirtualHost command
to update the host name to myHostName and removes
any previously set port value:
wsadmin -user admin -password admin -lang jython wsadmin>AdminTask.setBPMVirtualHost(['-de', 'De1', '-name', 'myVirtualHost', '-hostname', 'myHostName', '-port']) wsadmin>AdminConfig.save()