4 Running Oracle HTTP Server

This chapter provides information on how to run Oracle HTTP Server. It contains procedures for creating a server instance and how to start, stop, and manage an instance in both a WebLogic and a standalone environment.

This chapter includes the following sections:

4.1 Before You Begin

Before performing any of the tasks described in this chapter, you need to do the following:

  1. Install and configure Oracle HTTP Server, as described in Installing and Configuring Oracle HTTP Server.

  2. If you run Oracle HTTP Server in a WebLogic Server Domain, start WebLogic Server as described in "Starting and Stopping Servers" in Administering Server Startup and Shutdown for Oracle WebLogic Server.

    Note:

    When you start WebLogic Server from the command line, you might encounter many warning messages scrolling by. Despite these messages, WebLogic Server should start normally.
  3. Start Node Manager (required for both WebLogic and standalone domains), as described in "Using Node Manager" in Administering Node Manager for Oracle WebLogic Server.

4.2 Creating an OHS Instance

The Configuration Wizard enables you to create multiple Oracle HTTP Server instances simultaneously when you create a domain. If you are creating a WebLogic Server Domain, you are not required to create any instances; if you are creating a standalone domain, you need to create at least one Oracle HTTP Server instance. When creating a WebLogic Server domain, if you elect not to create any instances, a warning appears; however, you are allowed to proceed with the configuration process.

Note:

If you are attempting to create an Oracle HTTP Server instance that uses a TCP port in the reserved range (typically less than 1024), then you must perform some extra configuration to allow the server to bind to privileged ports. For more information, see Section 4.3.2.4, "Starting Oracle HTTP Server Instances on a Privileged Port (UNIX Only)."

Note:

Oracle Fusion Middleware contains many versions of WLST. The WLST commands used in all procedures in this chapter will only work if you run the WLST implementation on ORACLE_HOME/ohs/common/bin/.

4.2.1 Creating a Managed Instance in a WebLogic Server Domain

You can create a managed Oracle HTTP Server instance in a WebLogic Server Domain by using either the custom WebLogic Scripting Tool (WLST) command createOHSInstance()or from Fusion Middleware Control installed as part of a Oracle Fusion Middleware infrastructure. The following sections describes these procedures.

Note:

If you are working with a WebLogic Server Domain, it is recommended to use the Oracle HTTP Server custom WLST commands, described in Section 3.6, "Using the WebLogic Scripting Tool". These commands offer superior error checking, provide automatic port management, and so on.

4.2.1.1 Creating an Instance by Using WLST

To create an OHS instance in a WebLogic Server Domain by using WLST, do the following:

  1. From the command line, launch WLST:

    Linux: $ORACLE_HOME/ohs/common/bin/wlst.sh

    Windows: $ORACLE_HOME\ohs\common\bin\wlst.cmd

  2. Connect to WLST:

    • In a WebLogic Server Domain:

      > connect('loginID', 'password', '<adminHost>:<adminPort>')
      

      For example:

      > connect('weblogic', 'welcome1', 'abc03lll.myCo.com:7001')
      
  3. Use the createOHSInstance() command, with an instance and machine name—which was assigned during domain creation—to create the instance:

    > createOHSInstance(instanceName='ohs1', machine='abc03lll.myCo.com', [listenPort=XXXX], [sslPort=XXXX], [adminPort=XXXX]) 
    

    Note:

    If Node Manager should be down, the create command will take place partially. The master copy of the config files will appear at OHS/componentName. Once Node Manager comes back up, the system will resync and the runtime copy of the files will appear at OHS/instances/componentName.

    For example:

    > createOHSInstance(instanceName='ohs1', machine='abc03lll.myCo.com')
    

    Note:

    If you do not provide port numbers, they will be assigned automatically.

See also:

For information on using the WebLogic Scripting Tool (WLST), see Understanding the WebLogic Scripting Tool.

4.2.1.2 Creating an Instance by Using Fusion Middleware Control

To create an Oracle HTTP Server instance in a WebLogic Server Domain by using Fusion Middleware Control installed as part of the Oracle Fusion Middleware infrastructure, do the following:

  1. Log in to Fusion Middleware Control and navigate to the system component instance home page for the WebLogic Server Domain within which you want to create the Oracle HTTP Server instance.

  2. Open the WebLogic Server Domain menu and select Administration then Create/Delete OHS.

    Note:

    Create/Delete OHS will only appear if you have extended the domain by using the Oracle HTTP Server domain template. Otherwise, this command will not be available.
    Description of cre_del_ohs.gif follows
    Description of the illustration ''cre_del_ohs.gif''

    The OHS Instances page appears.

    Description of cre_ohs_inst_page_new.gif follows
    Description of the illustration ''cre_ohs_inst_page_new.gif''

  3. Click Create.

    The Create OHS Instance page appears.

    Description of cre_ohs_inst_page.gif follows
    Description of the illustration ''cre_ohs_inst_page.gif''

  4. In Instance Name, type a unique name for the Oracle HTTP Server instance; for example, ohs4.

  5. In Machine Name, click the drop-down control and select the machine to which you want to associate the instance.

  6. Click OK.

    The OHS Instance page reappears, showing a confirmation message and the new instance. The port number is automatically assigned.

    Description of cre_inst_conf.gif follows
    Description of the illustration ''cre_inst_conf.gif''

After creating the instance, the Column on the OHS Instances page shows a down-arrow for that instance.

Description of cre-status.gif follows
Description of the illustration ''cre-status.gif''

This indicates that the instance is not running. For instructions on starting an instance, see Section 4.3.2, "Starting Oracle HTTP Server Instances". Once started, the arrow will point up.

4.2.1.3 Instance Provisioning

Once an instance is created, it will be provisioned within the DOMAIN_HOME.

  • The master copy will be in:

    DOMAIN_HOME/config/fmwconfig/components/OHS/componentName

  • The runtime will be in:

    DOMAIN_HOME/config/fmwconfig/components/OHS/instances/componentName

    Node Manager must be running to provision an instance in runtime.

Immediately after creation, the state reported for an OHS instance will vary depending on how the instance was created:

  • If createOHSInstance() was used, the reported state for the instance will be SHUTDOWN.

  • If the Configuration Wizard was used, the reported state for the instance will be UNKNOWN.

4.2.2 Creating a Standalone Domain Instance

If you select Standalone as your domain during server configuration, the Configuration Wizard will create the domain but during this process you must create at least one Oracle HTTP Server instance. For more information, see Installing and Configuring Oracle HTTP Server.

4.2.3 Encountering Performance Issues with Instances Created on Shared File Systems

If you encounter functional or performance issues when creating an Oracle HTTP Server instance on a shared filesystem, including NFS (Network File System), it might be due to filesystem accesses in the default configuration and you will need to update the httpd.conf file specific to your operating systems. For information on updating the this file, see Section 5.3.9, "Updating Oracle HTTP Server Component Configurations on a Shared Filesystem".

4.3 Performing Basic OHS Tasks

You can use Fusion Middleware Control or WebLogic Scripting Tool for the following tasks:

About Using the WLST Commands

If you plan to use WLST, you should familiarize yourself with that tool. You should also be aware of the following:

  • The online WLST commands described in this section and used in WebLogic Server Domains will only work if you run them from the WLST implementation on ORACLE_HOME/ohs/common/bin/wlst.sh (wlst.cmd on Windows).

  • If you are running a standalone version of Oracle HTTP Server, you must use the offline, or "agent", WLST commands, which are also available in ORACLE_HOME/ohs/common/bin/wlst.sh (wlst.cmd on Windows). These commands are described in their appropriate context.

For more information, see "Getting Started Using the Oracle WebLogic Scripting Tool (WLST)" in the Oracle® Fusion Middleware Administrator's Guide.

4.3.1 Understanding the PID File

When Oracle HTTP Server starts, it writes the process ID (PID) of the parent httpd process to the httpd.pid file located in the following directory:

DOMAIN_HOME/servers/<componentName>/logs

The process ID can be used by the administrator when restarting and terminating the daemon. If a process stops abnormally, it is necessary to stop the httpd child processes using the kill command. You must not change the default PID file name or its location.

The PidFile directive in httpd.conf specifies the location of the PID file; however, you should never modify the value of this directive.

Note:

On UNIX/Linux platforms, if you edit the PidFile directive, you also have to edit the ORACLE_HOME/ohs/bin/apachectl file to specify the new location of the PID file.

See Also:

PidFile directive in the Apache HTTP Server documentation at:

http://httpd.apache.org/docs/current/mod/mpm_common.html#pidfile

4.3.2 Starting Oracle HTTP Server Instances

This section describes how to start Oracle HTTP Server using Fusion Middleware Control and WLST.

4.3.2.1 Starting Oracle HTTP Server Instances by Using Fusion Middleware Control

To start Oracle HTTP Server using Fusion Middleware Control, navigate to the Oracle HTTP Server home page and do one of the following:

  • From the Oracle HTTP Server menu:

    1. Select Control.

    2. Select Start Up from the Control menu.

  • From the Target Navigation tree:

    1. Right-click the Oracle HTTP Server instance you want to start.

    2. Select Control.

    3. Select Start Up from the Control menu.

  • From the page header, select Start Up.

    The instance will start in the state UNKNOWN.

4.3.2.2 Starting Oracle HTTP Server Instances by Using WLST

To start all Oracle HTTP Server components in a system component instance by using WLST (this procedure assumes you have created as OHS instance, as described in Section 4.2, "Creating an OHS Instance" and WLST is running), use the start() command in a WebLogic Server Domain or nmStart() for standalone domain, as shown here:

Notes:

  • Node Manager must be running for these commands to work. If it is down, you will receive an error message.

  • serverType is required for standalone domains. If it is not included an error will be thrown referencing an inability to find startWebLogic.

Domain Syntax Example
WebLogic
start('instanceName')
or
nmStart(serverName='name', serverType='type')
start('ohs1')
or
nmStart(serverName='ohs1', serverType='OHS')
Standalone
nmStart(serverName='name', serverType='type')
nmStart(serverName='ohs1', serverType='OHS')

If you used createOHSInstance() to create the instance (Section 4.2, "Creating an OHS Instance"), the state initially reported for the instance will be SHUTDOWN.

4.3.2.3 Starting Oracle HTTP Server Instances from the Command Line

You can start Oracle HTTP Server directly from a command line—that is, without launching WLST—by entering the following command:

Linux: $DOMAIN_HOME/bin/startComponent.sh componentName

Windows: %DOMAIN_HOME%\bin\startComponent.cmd componentName

For example:

$DOMAIN_HOME/bin/startComponent.sh ohs1

The startComponent script contacts the Node Manager and runs the nmStart() command.

After a few seconds, you will be prompted for your Node Manager password. Type that and press Enter.

Successfully started server componentName...
Successfully disconnected from Node Manager...

Exiting WebLogic Scripting Tool.

Note:

If you encounter any odd system messages upon startup, you can ignore them.
4.3.2.3.1 Storing Your Node Manager Password

You can avoid having to enter your Node Manager password every time you launch the server with startComponent.sh/.cmd by starting it with the storeUserConfig option for the first time. Do the following:

  1. At the prompt, enter the following command:

    $DOMAIN_HOME/bin/startComponent.sh componentName storeUserConfig
    

    The system will prompt for your Node Manager password.

  2. Enter your password.

    The system responds with this message:

    Creating the key file can reduce the security of your system if it is not kept in a secured location after it is created. Creating new key...The username and password that were used for this WebLogic NodeManager connection are stored in $HOME/.wlst/nm-cfg-myDomainName.props and $HOME /.wlst/nm-key-myDomainName.props. 
    

4.3.2.4 Starting Oracle HTTP Server Instances on a Privileged Port (UNIX Only)

WARNING:

When this procedure is completed, any Oracle HTTP Server processes running from this Oracle Home as a user in the same group will be able to bind to privileged ports.

On a UNIX system, TCP ports in a reserved range (typically less than 1024) can only be bound by processes with root privilege. Oracle HTTP Server always runs as a non-root user; that is, the user who installed Oracle Fusion Middleware. On UNIX, special configuration is required to allow Oracle HTTP Server to bind to privileged ports.

To enable Oracle HTTP Server to listen on a port in the reserved range (for example, the default port 80 or port 443) as a process without root privilege, use the following one-time setup on each Oracle HTTP Server machine:

  1. As the same user who will start Oracle HTTP Server, create a temporary cap.ora file by entering the following:

    echo `id -ng`: bind  > /tmp/cap.ora
    

    Note:

    Steps 2 and 3 must be performed as the root user. If you do not have root access, have the system administrator perform these steps.
  2. Update the ORACLE_HOME/oracle_common/bin/hasbind file by performing the following steps:

    1. Change ownership of the file to root:

      chown root $ORACLE_HOME/oracle_common/bin/hasbind
      
    2. Change the permissions on the file as follows:

      chmod 4755 $ORACLE_HOME/oracle_common/bin/hasbind
      

      Note:

      In the above example, the value 4 refers to the setuid bit. To bind Oracle HTTP Server to the privileged ports, ensure that the NFS file system is mounted with the suid option. If the file system is mounted with the nosuid option, then privileged ports are not used.
  3. Generate the /etc/cap.ora file by performing the following steps:

    1. If /etc/cap.ora does not exist, copy the temporary cap.ora file you created in step 1 to the /etc/ directory:

      cp /tmp/cap.ora /etc/cap.ora
      

      If /etc/cap.ora does exist, append the contents of the temporary file you created in step 1 to the existing /etc/cap.ora file:

      cat /tmp/cap.ora >> /etc/cap.ora
      
    2. Change the permissions on the /etc/cap.ora file as follows:

      chmod 644 /etc/cap.ora
      
    3. Change ownership of the file to root:

      chown root /etc/cap.ora
      

    The steps that require root permissions are now complete.

  4. If you prefer, remove the temporary cap.ora you created in step 1:

    rm /tmp/cap.ora
    
  5. Modify the port settings for Oracle HTTP Server as described in Section 7.4, "Managing Ports".

  6. Start (or restart) the instance by using any of the start-up methods described in Section 4.3.2, "Starting Oracle HTTP Server Instances".

4.3.3 Stopping Oracle HTTP Server Instances

This section describes how to stop Oracle HTTP Server using Fusion Middleware Control and WLST. Be aware that other services might be impacted when Oracle HTTP Server is stopped.

4.3.3.1 Stopping Oracle HTTP Server Instances by Using Fusion Middleware Control

To stop Oracle HTTP Server using Fusion Middleware Control, navigate to the Oracle HTTP Server home page and do one of the following:

  • From the Oracle HTTP Server menu:

    1. Select Control.

    2. Select Shut Down from the Control menu.

  • From the Target Navigation tree:

    1. Right-click the Oracle HTTP Server component you want to stop.

    2. Select Control.

    3. Select Shut Down from the Control menu.

  • From the page header, select Shut Down.

4.3.3.2 Stopping Oracle HTTP Server Instances by Using WLST

To stop Oracle HTTP Server by using WLST, from within the scripting tool, use one of the following commands:

Notes:

  • Node Manager must be running for these commands to work. If it is down, you will receive an error message.

  • serverType is required for standalone domains. If it is not included an error will be thrown referencing an inability to find startWebLogic

Domain Syntax Example
WebLogic
shutdown('serverName')
shutdown('ohs1')
Standalone
nmKill(serverName='serverName', serverType='type')Foot 1 
nmKill(serverName='ohs1', serverType='OHS')

Footnote 1 nmKill() will also work in a WebLogic domain.

WARNING:

If you run shutdown() without specifying any parameters, WebLogic Server will terminate and exit WLST. Oracle HTTP Server will continue running. To recover, restart WebLogic Server, launch WLST, and reconnect to the AdminServer. Then re-run the shutdown with the Oracle HTTP Server instance name.

4.3.3.3 Stopping Oracle HTTP Server Instances from the Command Line

You can stop Oracle HTTP Server directly from a command line—that is, without launching WLST—by entering the following command:

$DOMAIN_HOME/bin/stopComponent.sh componentName

For example:

$DOMAIN_HOME/bin/stopComponent.sh ohs1

This command invokes WLST and tells it to run its nmKill() command. The stopComponent command will not function if the Node Manager is not running.

After a few seconds, you will be prompted for your Node Manager password (unless you started the Node Manager with the storeUserConfig option as described in Section 4.3.2.3.1, "Storing Your Node Manager Password"). Enter the password. Once the server is stopped, the system will respond:

Successfully killed server componentName...
Successfully disconnected from Node Manager...

Exiting WebLogic Scripting Tool.

4.3.4 Restarting Oracle HTTP Server Instances

Restarting Oracle HTTP Server causes the Apache parent process to advise its child processes to exit after their current request (or to exit immediately if they are not serving any requests). Upon restarting, the parent process re-reads its configuration files and reopens its log files. As each child process exits, the parent replaces it with a child process from the new generation of the configuration file, which begins serving new requests immediately.

The following sections describe how to restart Oracle HTTP Server using Fusion Middleware Control and WLST.

4.3.4.1 Restarting Oracle HTTP Server Instances by Using Fusion Middleware Control

To restart OHS using Fusion Middleware Control, navigate to the Oracle HTTP Server home page and do one of the following:

  • From the Oracle HTTP Server menu:

    1. Select Control.

    2. Select Restart from the Control menu.

  • From the Target Navigation tree:

    1. Right-click the OHS instance you want to stop.

    2. Select Control.

    3. Select Restart from the Control menu.

4.3.4.2 Restarting Oracle HTTP Server Instances by Using WLST

To restart OHS by using WLST, use the softRestart() command. From within the scripting tool, enter one of the following commands:

Notes:

  • For the WebLogic and the Standalone domains, the Node Manager must be running (that is, state is RUNNING) for these commands to work. If it is down, you will receive an error message.

  • All parameters are required for standalone domains. If they are not included, an error will be thrown referencing an inability to find startWebLogic.

Domain Syntax Example
WebLogic
softRestart('serverName')
softRestart('ohs1')
Standalone
nmSoftRestart(serverName='name', serverType='type')
nmSoftRestart(serverName='ohs1', serverType='OHS')

4.3.5 Checking the Status of a Running Oracle HTTP Server Instance

This section describes how to check the status of a running Oracle HTTP Server instance. You can check this information from either Fusion Middleware Control installed as part of an Oracle Fusion Middleware infrastructure or by using WLST.

4.3.5.1 Checking Server Status by Using Fusion Middleware Control

An up or down arrow in the top left corner of any Oracle HTTP Server page's header indicates whether the selected server instance is running. This image shows the up arrow, indicating that the server instance, in this case, "ohs2", is running:

Description of up_arrow.gif follows
Description of the illustration ''up_arrow.gif''

This image shows a down arrow, indicating that the server instance, in this case, "ohs2", is not running:

Description of down_arrow.gif follows
Description of the illustration ''down_arrow.gif''

4.3.5.2 Checking Server Status by Using WLST

In a WebLogic Server Domain, if you used createOHSInstance() to create the Oracle HTTP Server instance, its initial state (that is, before starting it) will be SHUTDOWN.

If you used the Configuration Wizard to generate the instance (both WebLogic Server Domain and standalone domain), its initial state (that is, before starting) will be UNKNOWN.

To check the status of a running Oracle HTTP Server instance by using WLST, from within the scripting tool, enter the following:

Notes:

  • Node Manager must be running for these commands to work. If it is down, you will receive an error message. If Node Manager goes down in a WebLogic Server Domain, the state will be returned as UNKNOWN, regardless of the real state of the instance. Additionally state() does not inform you that it cannot connect to Node Manager.

  • Unlike other WLST commands, state() will not tell you when Node Manager is down so there is no way to distinguish an instance that truly is in state UNKNOWN as opposed to Node Manager simply being down.

  • All parameters are required for standalone domains. If they not included an error will be thrown referencing an inability to find startWebLogic.

Domain Syntax Example
WebLogic
state('serverName')
state('ohs1')
Standalone
nmServerStatus(serverName='name', serverType='type')
nmServerStatus(serverName='ohs1', serverType='OHS')

Note:

This command does not distinguish between non-existent components and real components in state UNKNOWN. Thus, if you enter a non-existent instance (for example, you made a typo), a state of UNKNOWN will be returned.

4.3.6 Deleting an Oracle HTTP Server Instance

You can delete an Oracle HTTP Server instance in both a WebLogic Server Domain and a standalone domain.

4.3.6.1 Deleting an Oracle HTTP Server Instance in a WebLogic Server Domain

In a WebLogic Server Domain, you can use either the custom WLST command deleteOHSInstance() or from Fusion Middleware Control installed as part of an Oracle Fusion Middleware infrastructure. The following sections describe these procedures.

4.3.6.1.1 Deleting an Instance by Using WLST

If you are in a WebLogic Server Domain, you can delete an Oracle HTTP Server instance by using the custom WLST command deleteOHSInstance(). When you use this command, the following happens:

  • The selected instance information is removed from config.xml.

  • All OHS configuration directories and their contents are deleted; for example, OHS/instanceName and OHS/instances/instanceName.

  • All logfiles associated with the deleted instance are deleted.

  • All state information for the deleted instance is removed.

Note:

You cannot delete an instance by using deleteOHSInstance() if Node Manager is down.

To delete an instance by using WLST:

  1. Connect to WLST, as described in Section 4.3.2.2, "Starting Oracle HTTP Server Instances by Using WLST".

  2. At the command prompt, enter:

    deleteOHSInstance(instanceName='instanceName')
    

    For example, to delete an OHS instance named ohs1 use the following command:

    deleteOHSInstance(instanceName='ohs1')
    

You cannot delete an OHS instance in either an UNKNOWN or a RUNNING state.

4.3.6.1.2 Deleting an Instance by Using Fusion Middleware Control

To delete an Oracle HTTP Server instance by using Fusion Middleware Control:

Note:

You cannot delete a running Oracle HTTP Server instance. If the instance is running, stop it, as described in Section 4.3.3, "Stopping Oracle HTTP Server Instances" and then proceed with the following steps.
  1. Log in to Fusion Middleware Control and navigate to the system component instance home page for the WebLogic Server Domain within which you want to delete the Oracle HTTP Server instance.

  2. Open the WebLogic Server Domain menu and select Administration then Create/Delete OHS.

    The OHS Instances page appears.

  3. Select the instance you want to delete and click Delete.

    A confirmation window appears.

  4. Click Yes to complete the deletion.

    The OHS Instances page appears, with an information message indicating that the selected Oracle HTTP Server instance was deleted.

4.3.6.2 Deleting an Oracle HTTP Server Instance from a Standalone Domain

You can delete an Oracle HTTP Server instance in a standalone domain by using the Configuration Wizard so long as it is not the only instance in the domain. The Configuration Wizard always requires at least one Oracle HTTP Server instance in a standalone domain so you will not be able to delete one if it is the only instance in the domain. If you want to delete the only instance in a standalone domain, you should instead completely remove the entire domain directory.

Deleting Oracle HTTP Server instances by using the Configuration Wizard is actually only a partial deletion (and is inconsistent with the way deletion occurs on the WebLogic Server domain side by using deleteOHSInstance(); see Section 4.3.6.1.1, "Deleting an Instance by Using WLST"). When you delete a standalone instance by using the Configuration Wizard, the following occurs:

  • Information on the specific instance is removed from config.xml, so this instance is no longer recognized as valid. When you launch the Configuration Wizard again for another update, the deleted instance will not appear.

  • The logs compiled for the deleted instance are left intact at: DOMAIN_HOME/servers/ohs1... If a new instance with the same name is subsequently created, it will inherit and continue logging to these files.

  • The deleted instance's configuration directories and their contents are not deleted; they remain intact at: DOMAIN_HOME/config/fmwconfig/components/OHS/instanceName and DOMAIN_HOME/config/fmwconfig/components/OHS/instances/instanceName. The only change in both directories is that the following files are renamed: httpd.conf becomes httpd.conf.bak; ssl.conf becomes ssl.conf.bak; and admin.conf becomes admin.conf.bak. This prevents the instance from being started. (If you create a new instance with the same name as the instance you deleted, this information will be overwritten, but the *.bak files will remain).

  • The deleted instance's state information is left intact at DOMAIN_HOME/system_components/... If a new instance of the same name is subsequently created, it will inherit the state of the old instance. Instead of starting in UNKNOWN, it could be SHUTDOWN or even FAILED_NOT_RESTARTABLE out of the gate.

To delete an Oracle HTTP Server instance in a standalone domain, do the following:

  1. Shutdown all running instances (see Section 4.3.3, "Stopping Oracle HTTP Server Instances"). Be aware the Configuration Wizard will not check the state of the Oracle HTTP Server instance so you will need to verify that all instances are indeed stopped before deletion.

  2. If it is running, shut down Node Manager.

  3. Launch the Configuration Wizard (see Installing and Configuring Oracle HTTP Server) and do the following:

    1. Select Update an existing domain and select the path to the domain.

    2. Skip both the Templates screen and the JDK Selection screen by clicking Next on each.

    3. On the System Components screen, select the instance you want to delete and click Delete.

      The selected instance is deleted.

    4. Click Next and, on the OHS Server screen, click Next again.

    5. On the Configuration Summary screen, verify that the selected instance has been deleted and click Update.

    6. On the Success screen, click Finish.

4.4 Remotely Administering Oracle HTTP Server

You can remotely manage an Oracle HTTP Server running in a standalone environment from a collocated Oracle HTTP Server implementation running on a separate machine. This feature enables you to use the WebLogic Scripting Tool (WLST) or Fusion Middleware Control installed as part of an Oracle Fusion Middleware infrastructure from the remote machine to start, restart, stop, and configure the component. This section describes how to set up Oracle HTTP Server to run remotely.

4.4.1 Setting Up a Remote Environment

The following instructions describe how to set up a remote environment, which will enable you to run Oracle HTTP Server installed on one machine from an installation on another. This section contains the following information:

4.4.1.1 Host Requirements

To remotely manage Oracle HTTP Server, you must have separate hosts installed on separate machines:

  • A collocated installation (for this example, this installation will be called host1).

  • A standalone installation (host2). The path to standalone MW_HOME on host2 must be the same as the path to the collocated MW_HOME on host1; for example:

    /scratch/user/work
    

4.4.1.2 Task 1: Set Up an Expanded Domain on host1

The following steps describe how to set up an expanded domain and link it to a database on the collocated version of Oracle HTTP Server (host1).

  1. Using the Repository Configuration Utility (RCU), set up and install a database for the expanded domain. For more information, see Oracle Fusion Middleware Creating Schemas with the Repository Creation Utility.

  2. Launch the Configuration Wizard and create an expanded domain. Use the values specified in Table 4-1.

    Table 4-1 Setting Up an Expanded Domain

    For... Select or Enter...

    Create Domain

    Create a new domain and specify its path (for example, MW_HOME/user_projects/domains/ohs1_domain)

    Templates

    Oracle HTTP Server (Collocated)

    Application Locations

    The default

    Administrator Account

    A username and password (for example, weblogic and welcome1)

    Database Configuration Type

    The RCU data. Then, click Get RCU Configuration and then Next.

    Optional Configuration

    The following items:

    • Administration Server

    • Node Manager

    • System Components

    • Deployment and Services

    Administration Server

    The listen address (All Local Addresses or the valid name or address for host1) and port

    Node Manager

    Per Domain and specify the NodeManager credentials (for example, weblogic and welcome1).

    System Components

    Add and set the fields, using OHS as the Component Type (for example, use a System Component value of ohs1).

    OHS Server

    The listen addresses and ports or use the defaults.

    Machines

    Add. This will add a machine to the domain (for example, ohs1_Machine) and the Node Manager listen and port values. You must specify a listen address for host2 that is accessible from host1, such the valid name or address for host2 (do not use localhost or All Local Addresses).

    Assign System Components

    The OHS component (for example, ohs1) then use the right arrow to assign the component to the machine (ohs1_machine, for example).

    Configuration Summary

    Create (note that the OPSS steps may take some minutes).


4.4.1.3 Task 2: Pack the Domain on host1

On host1, use the following command to pack the domain:

<MW_HOME>/ohs/common/bin/pack.sh -domain=path to domain -template=path to template -template_name=name -managed=true

For example:

<MW_HOME>/ohs/common/bin/pack.sh -domain=<MW_HOME>/user_projects/domains/ohs1_domain -template=/tmp/ohs1_tmplt.jar -template_name=ohs1 -managed=true

4.4.1.4 Task 3: Unpack the Domain on host2

Use the following steps to unpack the domain you packed on host1, above, on host2:

  1. Copy the template file created in 0, "Task 2: Pack the Domain on host1" from host1 to host2.

  2. Use the following command to unpack the domain:

    <MW_HOME>/ohs/common/bin/unpack.sh -domain=path to domain -template=path to template
    

    For example:

    <MW_HOME>/ohs/common/bin/unpack.sh -domain=<MW_HOME>/user_projects/domains/ohs1_domain -template=/tmp/ohs1_tmplt.jar
    

4.4.2 Running Oracle HTTP Server Remotely

Once you have unpacked the domain created on host1 onto host2, you can use the same set of WLST commands and Fusion Middleware Control tools you would in a collocated environment to start, stop, restart, and configure the component.

To run an Oracle HTTP Server remotely, do the following:

  1. Start the WebLogic Administration Server on host1:

    <MW_HOME>/user_projects/domains/ohs1_domain/bin/startWebLogic.sh &
    
  2. Start Node Manager on host2:

    <MW_HOME>/user_projects/domains/ohs1_domain/bin/startNodeManager.sh &
    

You can now run the Oracle HTTP Server instance on host2 from the collocated implementation on host1. You can use any of the WLST commands or any of the Fusion Middleware Control tools. For example, to connect host2 to Node Manager and start the server ohs1, from host1 enter:

<MW_HOME>/ohs/common/bin/wlst.sh
nmConnect('weblogic', '<password>', '<nm-host>', '<nm-port>', '<domain-name>', '<domain-directory>','ssl') 
nmStart(serverName='ohs1', serverType='OHS')

See Section 4.3, "Performing Basic OHS Tasks" for information on starting, stopping, restarting, and configuring Oracle HTTP Server components.