A Oracle HTTP Server WLST Custom Commands
There are specific WLST Server commands for managing Oracle HTTP Server in WebLogic Server domains. Most are online commands, which require a connection between WLST and Administration Server for the domain.
This appendix contains information on Oracle HTTP Server specific WLST commands:
- Getting Help on Oracle HTTP Server WLST Custom Commands
Online help is available for Oracle HTTP Server WLST custom commands. - Using WLST Online Commands
Following section describes how to use WLST online commands. - Oracle HTTP Server Commands
Use theohs_createInstance
andohs_deleteInstance
commands to create and delete Oracle HTTP Server instances instead of using the Configuration Wizard. These custom commands perform additional error checking and assign ports automatically in the case of instance creation.
Getting Help on Oracle HTTP Server WLST Custom Commands
Online help is available for Oracle HTTP Server WLST custom commands.
To get online help, enter help('manageohs')
from the WLST command line and it will display all the of the WLST custom commands for Oracle HTTP Server.
To get help for specific WLST custom commands, enter help('
custom_command_name
')
from the WLST command line, for example:
help('ohs_createInstance')
Parent topic: Oracle HTTP Server WLST Custom Commands
Using WLST Online Commands
Following section describes how to use WLST online commands.
Parent topic: Oracle HTTP Server WLST Custom Commands
Oracle HTTP Server Commands
Use the ohs_createInstance
and ohs_deleteInstance
commands to create and delete Oracle HTTP Server instances instead of using the Configuration Wizard. These custom commands perform additional error checking and assign ports automatically in the case of instance creation.
The WLST custom commands listed in Table A-1 manage Oracle HTTP Server instances in WebLogic Server domains.
Table A-1 Oracle HTTP Server Commands
Use this command... | To... | Use with WLST... |
---|---|---|
Add the LogLevel property to Oracle HTTP Server Administration server property file. Add a property to OHS Admin server property file
( |
Online |
|
Add a property to the Oracle HTTP Server Node Manager plug-in property file
( |
Online |
|
Create a new instance of Oracle HTTP Server. Create a managed Oracle HTTP Server instance. |
Online |
|
ohs_createTestDomain |
Create a compact domain for testing or other non-production use of Oracle HTTP Server. This method is now deprecated. |
Online |
Delete the specified Oracle HTTP Server instance. Delete a managed Oracle HTTP Server instance. |
Online |
|
Exports the keyStore to the specified Oracle HTTP Server instance. Export the keyStore to the specified Oracle HTTP Server instance. |
Online |
|
Creates a keystore in the KSS database in the case where Oracle HTTP Server instances were created using Configuration Wizard. Perform post instance creation tasks. |
Online |
- ohs_admin.properties
- ohs_addNMProperties
- ohs_createInstance
- ohs_deleteInstance
- ohs_exportKeyStore
- ohs_updateInstances
Parent topic: Oracle HTTP Server WLST Custom Commands
ohs_admin.properties
This is a per domain file which is used to configure the LogLevel parameter in
ohs_admin.log
file.
Use with WLST: Online
Syntax
ohs_addAdminProperties(logLevel = 'value')
When the log level for ohs_admin.log
has to be changed, then this
command has to be used.
File path:
$DOMAIN_HOME/config/fmwconfig/components/OHS
Argument | Description |
---|---|
|
The granularity of information written to the log. The default is
|
Example
This example creates a log file when log level is set to FINEST
.
ohs_addAdminProperties(logLevel = 'FINEST')
Parent topic: Oracle HTTP Server Commands
ohs_addNMProperties
Use with WLST: Online
Description
The ohs_addNMProperties
command adds a property to the Oracle HTTP Server Node Manager plug-in property file (ohs_nm.properties
). This command is available when WLST is connected to an Administration Server instance.
Syntax
ohs_addNMProperties(logLevel = 'value', machine='node-manager-machine-name')
Argument | Description |
---|---|
|
The granularity of information written to the log. The default is
|
machine |
The name of the machine on which Node Manage is running. |
Example
This example creates a log file with name ohs_nm.log
under the path <domain_dir>
/system_components/OHS
with log level is set to FINEST
on the target machine, my_NM_machine
. The user need not restart Node Manager.
ohs_addNMProperties(logLevel = 'FINEST', machine = 'my_NM_machine')
Parent topic: Oracle HTTP Server Commands
ohs_createInstance
Use with WLST: Online
Description
The ohs_createInstance
command creates a new instance of Oracle HTTP Server, allowing critical configuration such as listening ports to be specified explicitly or assigned automatically.
Syntax
ohs_createInstance(instanceName='xxx', machine='yyy', serverName='zzz', ...)
Argument | Definition |
---|---|
|
The name of the managed instance being created. |
|
The existing machine entry for the instance. This name (often serverConfig() cd('Machines') ls() |
|
(Optional) The port number of the non-SSL server. If this value is not specified, a port is automatically assigned. Listen ports typically begin at 7777 and go up from there. |
|
(Optional) The port number of the SSL virtual host. If this value is not specified, a port is automatically assigned. SSL ports typically start at 4443 and go up from there. |
|
(Optional) The port number used for communication with Node Manager. If this value is not specified, a port is automatically assigned. Administration ports typically begin at 9999 and go up from there. |
|
(Optional) The value of the ServerName directive of the non-SSL server. If this value is not specified, the host name of the machine and the listen port will be used to construct the value. |
Example
The following example creates an Oracle HTTP Server instance called ohs1
that runs on the machine abc03.myCorp.com
:
ohs_createInstance(instanceName='ohs1', machine='abc03.myCorp.com')
Parent topic: Oracle HTTP Server Commands
ohs_deleteInstance
Use with WLST: Online
Description
The ohs_deleteInstance
command deletes a specified Oracle HTTP Server instance. The instance must be stopped before you can delete it. This command will return an error if the instance is in the UNKNOWN
or RUNNING
state.
Syntax
ohs_deleteInstance(instanceName='xxx')
instanceName
is the name of the Oracle HTTP Server instance.
Example
The following example deletes the Oracle HTTP Server instance ohs1
.
ohs_deleteInstance(instanceName='ohs1')
Parent topic: Oracle HTTP Server Commands
ohs_exportKeyStore
Use with WLST: Online
Description
The ohs_exportKeyStore
command exports the keystore to the specified Oracle HTTP Server instance location. This command is available when WLST is connected to an Administration Server instance. For more information on how to use this command, see Exporting the Keystore to an Oracle HTTP Server Instance Using WLST.
Syntax
ohs_exportKeyStore(keyStoreName='<keyStoreName>', instanceName = '<instanceName>')
Argument | Description |
---|---|
keyStoreName |
The name of the keystore. |
instanceName |
The name of the Oracle HTTP Server instance. |
Naming Conventions for Keystores
The keystore name (keyStoreName
) must start with the string: <
instanceName
>_
.
For example, presume that the keystore must be exported to an Oracle HTTP Server instance named ohs1
. Then the names of all of the keystores that must be exported to ohs1
must start with ohs1_
.
If this syntax is not followed while creating the keystore, then the export of the keystore might not be successful.
Example
This example exports the keystore ohs1_myKeystore
to the Oracle HTTP Server instance ohs1
.
ohs_exportKeyStore(keyStoreName='ohs1_myKeystore', instanceName = 'ohs1')
Parent topic: Oracle HTTP Server Commands
ohs_updateInstances
Use with WLST: Online
Description
The ohs_updateInstances
command is available only when WLST is connected to an Administration Server instance. It will parse across all of the Oracle HTTP Server instances in the domain and perform the following tasks:
-
Create a new keystore with the name
<
instanceName
>_default
if one does not exist. -
Put a demonstration certificate,
demoCASignedCertificate
, in the newly created keystore. -
Export the keystore to the instance location.
This command is to be used after an Oracle HTTP Server instance is created using Configuration Wizard in collocated mode only.
Syntax
ohs_updateInstances()
This command does not take any arguments.
Example
ohs_updateInstances()
Parent topic: Oracle HTTP Server Commands