Fusion Middleware Documentation
Advanced Search


WLST Command Reference for Infrastructure Components
Close Window

Table of Contents

Show All | Collapse

10 Oracle HTTP Server Custom WLST Commands

Five OHS-specific WLST commands are provided for managing Oracle HTTP Server in WebLogic Server domains. Most are online commands, which require a connection between WLST and the administration server for the domain:

Use the commands listed in Table 10-1 to create, start, stop, and delete Oracle HTTP Server components in WebLogic Server domains.

Table 10-1 IOracle HTTP Server Commands

Use this command... To... Use with WLST...

createOHSInstance()

Create a new instance of Oracle HTTP Server.

Online

deleteOHSInstance()

Deletes the specified Oracle HTTP Server instance.

Online

addOHSAdminProperties()

Adds the LogLevel property to Oracle HTTP Server Administration server property file.

Online

addOHSNMProperties()

Adds a property to the Oracle HTTP Server Node Manager plug-in property file.

Online

createOHSTestDomain()

Creates a compact domain for testing or other non-production uses of Oracle HTTP Server.

Offline


Oracle HTTP Server Commands

You should use the createOHSInstance() and deleteOHSInstance() commands to create and delete Oracle HTTP Server instances instead of using the Configuration Wizard or offline WLST, as these custom commands perform additional error checking and, in the case of instance creation, automatic port assignment. The WLST commands described for Oracle HTTP Server will only work if you run the WLST implementation on $ORACLE_HOME/ohs/common/bin/.

createOHSInstance()

Use with WLST: Online

Description

createOHSInstance() creates a new instance of Oracle HTTP Server, allowing critical configuration such as listening ports to be specified explicitly or assigned automatically.

Syntax

createOHSInstance(instanceName='xxx', machine='yyy', serverName='zzz', ...)
Argument Definition
instanceName

The name of the managed instance being created.

machine

The existing machine entry for the instance. This name is set during creation of the WebLogic Server Domain. If you forget the name, you can check $ORACLE_INSTANCE/config/config.xml and look for the <machine> block. Alternately, in WLST you can find the machine name by running:

serverConfig()
cd('Machines')
ls()
listenPort

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

sslPort

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

adminPort

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

serverName

(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:

createOHSInstance(instanceName='ohs1', machine='abc03.myCorp.com')

deleteOHSInstance()

Use with WLST: Online

Description

deleteOHSInstance() 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

deleteOHSInstance(instanceName='xxx')

instanceName is the only argument deleteOHSInstance() accepts.

Example

The following example deletes the Oracle HTTP Server ohs1.

deleteOHSInstance(instanceName='ohs1')

addOHSAdminProperties()

Use with WLST: Online

Description

addOHSAdminProperties() adds the LogLevel property to Oracle HTTP Server Administration server property file (ohs_admin.properties); LogLevel is the only parameter addOHSAdminProperties() currently supports. This command is available when WLST is connected to an Administration Server instance.

Syntax

addOHSAdminProperties(logLevel = 'value')
Argument Description
LogLevel

The granularity of information written to the log. The default is INFO; other values accepted are:

  • ALL

  • CONFIG

  • FINE

  • FINER

  • FINEST

  • OFF

  • SEVERE

  • WARNING


Example

This example creates a log file with log level is set to FINEST.

addOHSAdminProperties(logLevel = 'FINEST')

addOHSNMProperties()

Use with WLST: Online

Description

addOHSNMProperties() 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

addOHSNMProperties(logLevel = 'value', machine='node-manager-machine-name')
Argument Description
LogLevel

The granularity of information written to the log. The default is INFO; other values accepted are:

  • ALL

  • CONFIG

  • FINE

  • FINER

  • FINEST

  • OFF

  • SEVERE

  • WARNING

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.

addOHSNMProperties(logLevel = 'FINEST', machine = 'my_NM_machine')

createOHSTestDomain()

Use with WLST: Offline

Description

createOHSTestDomain() creates a compact domain for testing or other non-production uses of Oracle HTTP Server. The domain will include the template for managed Oracle HTTP Server instances. Only collocated instances are supported. This command should be issued offline, when WLST is not connected to an Administration Server instance.

Syntax

createOHSTestDomain(domainName = 'domain-name', adminAccountPass = 'password', adminServerPort = nnnn, nmAccountName = 'nm-account', nmAccountPass = 'password', nmPort = nnnn)
Argument Description
domainName

(Optional) This is the name of the compact domain being created. If this is not specified, 'base_domain' will be used.

adminAccountPass

This is the password for the administration server account.

adminServerPort

(Optional) This is the HTTP and T3 port for the administration server. If this is not specified, 7001 will be used.

nmAccountName

This is the name of the node manager account.

nmAccountPass

This is the password for the node manager account.

nmPort

(Optional) This is the port number for node manager. If this is not specified, 5556 will be used.


Example

This example creates an Oracle HTTP Server test domain called testOHS. It also sets log-in credentials for the administration server and Node Manager.

createOHSTestDomain(domainName = 'testOHS', adminAccountPass = 'welcome1', nmAccountName = 'nm', nmAccountPass = 'welcome1')