11 Configuring the Web Tier for an Enterprise Deployment

It is important to understand how to install and configure a standalone Oracle HTTP Server domain that contains two Oracle HTTP Server instances: one on WEBHOST1 and one on WEBHOST2.

This chapter provides information on variables used when configuring the web tier and installing and configuring a web tier domain.

11.1 Variables Used When Configuring the Web Tier

While configuring the web tier, you will be referencing the directory variables listed in this section.

The values for several directory variables are defined in File System and Directory Variables Used in This Guide.

  • OHS_ORACLE_HOME

  • OHS_DOMAIN_HOME

In addition, you'll be referencing the following virtual IP (VIP) address and host names:

  • ADMINVHN

  • WEBHOST1

  • WEBHOST2

11.2 About the Web Tier Domains

In an enterprise deployment, each Oracle HTTP Server instance is configured on a separate host and in its own standalone domain. This allows for a simple configuration that requires a minimum amount of configuration and a minimum amount of resources to run and maintain.

For more information about the role and configuration of the Oracle HTTP Server instances in the web tier, see Understanding the Web Tier.

11.3 Installing Oracle HTTP Server on WEBHOST1

It is important to understand the procedure for installing the Oracle HTTP Server software on the web tier.

11.3.1 Starting the Installer on WEBHOST1

To start the installation program, perform the following steps.

  1. Log in to WEBHOST1.
  2. Go to the directory in which you downloaded the installation program.
  3. Launch the installation program by entering the following command:

    ./fmw_12.2.1.2.0_ohs_linux64.bin

    When the installation program appears, you are ready to begin the installation.

11.3.2 Navigating the Oracle HTTP Server Installation Screens

The following table lists the screens in the order that the installation program displays them.

If you need additional help with any of the installation screens, click the screen name.

Table 11-1 Oracle HTTP Server Installation Screens

Screen Description

Welcome

This screen introduces you to the product installer.

Auto Updates

Use this screen to automatically search My Oracle Support for available patches or automatically search a local directory for patches that you’ve already downloaded for your organization.

Installation Location

Use this screen to specify the location of your Oracle home directory.

For the purposes of an enterprise deployment, enter the value of the OHS_ORACLE_HOME variable listed in Table 7-3.

Installation Type

Select Standalone HTTP Server (Managed independently of WebLogic server).

This installation type allows you to configure the Oracle HTTP Server instances independently from any other existing Oracle WebLogic Server domains.

Prerequisite Checks

This screen verifies that your system meets the minimum necessary requirements.

If there are any warning or error messages, verify that your host computers and the required software meet the system requirements and certification information described in Host Computer Hardware Requirements and Operating System Requirements for the Enterprise Deployment Topology.

Security Updates

If you already have an Oracle Support account, use this screen to indicate how you would like to receive security updates.

If you do not have an account, or if you are sure you want to skip this step, then clear the check box and verify your selection in the follow-up dialog box.

Installation Summary

Use this screen to verify the installation options you selected. If you want to save these options to a response file, click Save Response File and provide the location and name of the response file. Response files can be used later in a silent installation situation.

For more information about silent or command line installation, see Using the Oracle Universal Installer in Silent Mode in Installing Software with the Oracle Universal Installer.

Installation Progress

This screen allows you to see the progress of the installation.

Installation Complete

This screen appears when the installation is complete. Review the information on this screen, then click Finish to close the installer.

11.3.3 Verifying the Oracle HTTP Server Installation

To verify that your Oracle HTTP Server installation completed successfully, list files that were installed in the new Oracle home directory. You should see the following directories in the Oracle HTTP Server Oracle home:

ldap 
ohs 
srvm 
has 
css 
crs 
nls 
oracore 
precomp 
rdbms 
plsql 
jlib 
slax 
sqlplus 
xdk 
oracle_common 
webgate 
bin 
wlserver 
OPatch 
plugins 
oui 
perl 
network 
lib 
oraInst.loc 
install 
cfgtoollogs 
inventory

11.4 Creating a Web Tier Domain on WEBHOST1

It is essential to understand how to create a new Oracle HTTP Server standalone domain on the first Web tier host.

11.4.1 Starting the Configuration Wizard on WEBHOST1

To start the Configuration Wizard, navigate to the following directory and start the WebLogic Server Configuration Wizard, as follows:

cd OHS_ORACLE_HOME/oracle_common/common/bin
./config.sh

11.4.2 Navigating the Configuration Wizard Screens for an Oracle HTTP Server Domain

Oracle recommends that you create a standalone domain for the Oracle HTTP Server instances on each Web tier host.

The following topics describe how to create a new standalone Oracle HTTP Server domain:

Task 1   Selecting the Domain Type and Domain Home Location

On the Configuration Type screen, select Create a new domain.

In the Domain Location field, enter the value assigned to the OHS_DOMAIN_HOME variable.

Note the following:

  • The Configuration Wizard will create the new directory that you specify here.

  • Create the directory on local storage, so the web servers do not have any dependencies on on storage devices outside the DMZ.

Note:

Task 2   Selecting the Configuration Templates

On the Templates screen, select Oracle HTTP Server (Standalone) - 12.2.1.2.0 [ohs].

Tip:

More information about the options on this screen can be found in Templates in Oracle Fusion Middleware Creating WebLogic Domains Using the Configuration Wizard.

Task 3   Selecting the JDK for the Web Tier Domain.
Select the Oracle Hotspot JDK, which was installed in the Web tier Oracle home when you installed the Oracle HTTP Server software.
Task 4   Configuring System Components

On the System Components screen, configure one Oracle HTTP Server instance. The screen should by default have a single instance defined. This is the only instance you need to create.

  1. Note that the default instance name is ohs1 in the System Component field. You use this default name.

  2. Make sure OHS is selected in the Component Type field.

  3. Use the Restart Interval Seconds field to specify the number of seconds to wait before attempting a restart if an application is not responding.

  4. Use the Restart Delay Seconds field to specify the number of seconds to wait between restart attempts.

Task 5   OHS Server Screen

Use the OHS Server screen to configure the OHS servers in your domain:

  1. Select ohs1 from the System Component drop-down menu.

  2. In the Listen Address field, enter WEBHOST1.

    All of the remaining fields are pre-populated, but you can change the values as required for your organization. For more information about the fields on this screen, see OHS Server in Oracle Fusion Middleware Creating WebLogic Domains Using the Configuration Wizard.

  3. In the Server Name field, verify the value of the listen address and listen port.

    It should appear as follows:

    http://WEBHOST1:7777
    
Task 6   Configuring Node Manager

Select Per Domain Default Location as the Node Manager type, and specify the user name and password for the Node Manager.

Note:

For more information about the options on this screen, see Node Manager in Creating WebLogic Domains Using the Configuration Wizard.

For additional information, see Configuring Node Manager on Multiple Machines in Administering Node Manager for Oracle WebLogic Server.

Task 7   Reviewing Your Configuration Specifications and Configuring the Domain

The Configuration Summary screen contains the detailed configuration information for the domain you are about to create. Review the details of each item on the screen and verify that the information is correct.

You can go back to any previous screen if you need to make any changes, either by using the Back button or by selecting the screen in the navigation pane.

Click Update to execute the domain extension.

Tip:

More information about the options on this screen can be found in Configuration Summary in Creating WebLogic Domains Using the Configuration Wizard.

Task 8   Writing Down Your Domain Home

The Configuration Success screen will show the domain home location.

Make a note of the information provided here, as you will need it to start the servers and access the Administration Server.

Click Finish to close the Configuration Wizard.

11.5 Installing and Configuring a Web Tier Domain on WEBHOST2

After you install Oracle HTTP Server and configure a Web Tier domain on WEBHOST1, then you must also perform the same tasks on WEBHOST2.

  1. Log in to WEBHOST2 and install Oracle HTTP Server, using the instructions in Installing Oracle HTTP Server on WEBHOST1.

  2. Configure a new standalone domain on WEBHOST2, using the instructions in Creating a Web Tier Domain on WEBHOST1.

    Use the name ohs2 for the instance on WEBHOST2, and be sure to replace all occurrences of WEBHOST1 with WEBHOST2 and all occurrences of ohs1 with ohs2 in each of the examples.

11.6 Starting the Node Manager and Oracle HTTP Server Instances on WEBHOST1 and WEBHOST2

It is important to understand how to start the Oracle HTTP Server instances on WEBHOST1 and WEBHOST2.

11.6.1 Starting the Node Manager on WEBHOST1 and WEBHOST2

Before you can start the Oracle HTTP Server instances, you must start the Node Manager on WEBHOST1 and WEBHOST2:

  1. Log in to WEBHOST1 and navigate to the following directory:
    OHS_DOMAIN_HOME/bin
    
  2. Start the Node Manager as shown below, using nohup and nodemanager.out as an example output file:
    nohup OHS_DOMAIN_HOME/bin/startNodeManager.sh > OHS_DOMAIN_HOME/nodemanager/nodemanager.out 2>&1 &
    
  3. Log in to WEBHOST2 and perform steps 1 and 2.

For more information about additional Node Manager configuration options, see Advanced Node Manager Configuration in Administering Node Manager for Oracle WebLogic Server.

11.6.2 Starting the Oracle HTTP Server Instances

To start the Oracle HTTP Server instances:

  1. Navigate to the following directory on WEBHOST1:
    OHS_DOMAIN_HOME/bin
    

    For more information about the location of the OHS_DOMAIN_HOME directory, see File System and Directory Variables Used in This Guide.

  2. Enter the following command:
    ./startComponent.sh ohs1
    
  3. When prompted, enter the Node Manager password.
  4. Repeat steps 1 through 3 to start the ohs2 instance on WEBHOST2.

For more information, see Starting Oracle HTTP Server Instances in Administering Oracle HTTP Server.

11.7 Configuring Oracle HTTP Server to Route Requests to the Application Tier

It is important to understand how to update the Oracle HTTP Server configuration files so that the web server instances route requests to the servers in the domain.

11.7.1 About the Oracle HTTP Server Configuration for an Enterprise Deployment

The following topics provide overview information about the changes required to the Oracle HTTP Server configuration in an enterprise deployment.

11.7.1.1 Purpose of the Oracle HTTP Server Virtual Hosts

The reference topologies in this guide require that you define a set of virtual servers on the hardware load balancer. You can then configure Oracle HTTP Server to recognize requests to specific virtual hosts (that map to the load balancer virtual servers) by adding <VirtualHost> directives to the Oracle HTTP Server instance configuration files.

For each Oracle HTTP Server virtual host, you define a set of specific URLs (or context strings) that route requests from the load balancer through the Oracle HTTP Server instances to the appropriate Administration Server or Managed Server in the Oracle WebLogic Server domain.

11.7.1.2 About the WebLogicCluster Parameter of the <VirtualHost> Directive

A key parameter of the Oracle HTTP Server <VirtualHost> directive is the WebLogicCluster parameter, which is part of the WebLogic Proxy Plug-In for Oracle HTTP Server. When configuring Oracle HTTP Server for an enterprise deployment, consider the following information when adding this parameter to the Oracle HTTP Server configuration files.

The servers specified in the WebLogicCluster parameter are important only at startup time for the plug-in. The list needs to provide at least one running cluster member for the plug-in to discover other members of the cluster. The listed cluster member must be running when Oracle HTTP Server is started. Oracle WebLogic Server and the plug-in work together to update the server list automatically with new, failed, and recovered cluster members.

Some example scenarios:

  • Example 1: If you have a two-node cluster and then add a third member, you do not need to update the configuration to add the third member. The third member will be discovered on the fly at runtime.

  • Example 2: You have a three-node cluster but only two nodes are listed in the configuration. However, if both listed nodes are down when you start Oracle HTTP Server, then the plug-in would fail to route to the cluster. You must ensure that at least one of the listed nodes is running when you start Oracle HTTP Server.

    If you list all members of the cluster, then you guarantee you can route to the cluster, assuming at least one member is running when Oracle HTTP Server is started.

11.7.1.3 Recommended Structure of the Oracle HTTP Server Configuration Files

Rather than adding multiple virtual host definitions to the httpd.conf file, Oracle recommends that you create separate, smaller, and more specific configuration files for each of the virtual servers required for the products you are deploying. This avoids populating an already large httpd.conf file with additional content, and it can make troubleshooting configuration problems easier.

For example, in a typical Oracle Fusion Middleware Infrastructure domain, you can add a specific configuration file called admin_vh.conf that contains the virtual host definition for the Administration Server virtual host (ADMINVHN).

11.7.2 Modifying the httpd.conf File to Include Virtual Host Configuration Files

Perform the following tasks to prepare the httpd.conf file for the additional virtual hosts required for an enterprise topology:

  1. Log in to WEBHOST1.

  2. Locate the httpd.conf file for the first Oracle HTTP Server instance (ohs1) in the domain directory:

    cd OHS_DOMAIN_HOME/config/fmwconfig/components/OHS/ohs1/
    
  3. Verify if the httpd.conf file has the appropriate configuration as follows:

    1. Run the following command to verify the ServerName parameter, assure it is set correctly, substituting the correct value for the current WEBHOSTn:

      grep "ServerName http" httpd.conf   
      ServerName http://WEBHOST1:7777 
      
    2. Run the following command to verify there is an include statement that includes all *.conf files from the moduleconf subdirectory:

      grep moduleconf httpd.conf   
      IncludeOptional "moduleconf/*.conf"
      
    3. If either validation fails to return results, or returns results that are commented out, open the httpd.conf file in a text editor and make the required changes in the appropriate locations.

      # 
      # ServerName gives the name and port that the server uses to identify itself. 
      # This can often be determined automatically, but we recommend you specify 
      # it explicitly to prevent problems during startup. 
      # 
      # If your host doesn't have a registered DNS name, enter its IP address here. 
      # 
      ServerName http://WEBHOST1:7777 
      #  and at the end of the file:  
      # Include the admin virtual host (Proxy Virtual Host) related configuration 
      include "admin.conf"  
      IncludeOptional "moduleconf/*.conf"
      
    4. Save the httpd.conf file.

  4. Log in to WEBHOST2 and perform steps 2 an 3 for the httpd.conf file, replacing any occurrences of WEBHOST1 or ohs1 with WEBHOST2 or ohs2 in the instructions as necessary.

11.7.3 Creating the Virtual Host Configuration Files

To create the virtual host configuration files:

Note:

Before you create the virtual host configuration files, be sure you have configured the virtual servers on the load balancer, as described in Purpose of the Oracle HTTP Server Virtual Hosts.
  1. Log in to WEBHOST1 and change directory to the configuration directory for the first Oracle HTTP Server instance (ohs1):
    cd OHS_DOMAIN_HOME/config/fmwconfig/components/OHS/ohs1/moduleconf
    
  2. Create the admin_vh.conf file and add the following directive:
    <VirtualHost WEBHOST1:7777>
        ServerName admin.example.com:80
        ServerAdmin you@your.address
        RewriteEngine On
        RewriteOptions inherit
    </VirtualHost>
    
  3. Create the wcpinternal_vh.conf file and add the following directive:
    <VirtualHost WEBHOST1:7777>
        ServerName wcpinternal.example.com:80
        ServerAdmin you@your.address
        RewriteEngine On
        RewriteOptions inherit
    </VirtualHost>
    
  4. Restart the ohs1 instance:
    1. Change directory to the following location:
      cd OHS_DOMAIN_HOME/bin
      
    2. Enter the following commands to stop and start the instance; provide the node manager password when prompted:
      ./stopComponent.sh ohs1
      ./startComponent.sh ohs1
      
  5. Copy the admin_vh.conf file and the wcpinternal_vh.conf file to the configuration directory for the second Oracle HTTP Server instance (ohs2) on WEBHOST2:
    OHS_DOMAIN_HOME/config/fmwconfig/components/OHS/ohs2/moduleconf
    
  6. Edit the admin_vh.conf and wcpinternal_vh.conf files and change any references from WEBHOST1 to WEBHOST2 in the <VirtualHost> directives.
  7. Restart the ohs2 instance:
    1. Change directory to the following location:
      cd OHS_DOMAIN_HOME/bin
      
    2. Enter the following commands to stop and start the instance:
      ./stopComponent.sh ohs2
      ./startComponent.sh ohs2
      

11.7.4 Validating the Virtual Server Configuration on the Load Balancer

From the load balancer, access the following URLs to ensure that your load balancer and Oracle HTTP Server are configured properly. These URLs should show the initial Oracle HTTP Server 12c web page.

  • http://admin.example.com/index.html

  • http://wcpinternal.example.com/index.html

11.7.5 Configuring Routing to the Administration Server and Oracle Web Services Manager

To enable Oracle HTTP Server to route to the Administration Server and the WSM-PM_Cluster, which contain the WLS_WSM managed servers, you must add a set of <Location> directives and add the WebLogicCluster parameter to the list of nodes in the cluster.

To set the WebLogicCluster parameter:

  1. Log in to WEBHOST1, and change directory to the following location:
    cd OHS_DOMAIN_HOME/config/fmwconfig/components/OHS/ohs1/moduleconf/
    
  2. Add the following directives to the admin_vh.conf file within the <VirtualHost> tags:
    # Admin Server and EM
    <Location /console>
        WLSRequest ON
        WebLogicHost ADMINVHN
        WeblogicPort 7001
    </Location>
    
    <Location /consolehelp>
        WLSRequest ON
        WebLogicHost ADMINVHN
        WeblogicPort 7001
    </Location>
    
    <Location /em>
        WLSRequest ON
        WebLogicHost ADMINVHN
        WeblogicPort 7001
    </Location>
    

    The admin_vh.conf file should appear as it does in Example 1, "admin_vh.conf file".

  3. Add the following directives to the wcpinternal_vh.conf file within the <VirtualHost> tag:

    Note:

    Set the port numbers appropriately based on your WebLogic Managed Servers.
    # WSM-PM
    <Location /wsm-pm>
        WLSRequest ON
        WebLogicCluster WCCHOST1:7010,WCCHOST2:7010
        WLProxySSL OFF
        WLProxySSLPassThrough OFF
    </Location>
    

    The wcpinternal_vh.conf file should appear as it does in Example 2, "wcpinternal_vh.conf file".

    For more information about the WebLogicCluster parameter in this example, see About the WebLogicCluster Parameter of the <VirtualHost> Directive.

  4. Restart the ohs1 instance:
    1. Change directory to the following location:
      cd OHS_DOMAIN_HOME/bin
      
    2. Enter the following commands to stop and start the instance:
      ./stopComponent.sh ohs1
      ./startComponent.sh ohs1
      
  5. Copy the admin_vh.conf file and the wcpinternal_vh.conf file to the configuration directory for the second Oracle HTTP Server instance (ohs2) on WEBHOST2:
    OHS_DOMAIN_HOME/config/fmwconfig/components/OHS/ohs2/moduleconf/
    
  6. Edit the admin_vh.conf and wcpinternal_vh.conf files and change any references to WEBHOST1 to WEBHOST2 in the <VirtualHost> directives.
  7. Restart the ohs2 instance:
    1. Change directory to the following location:
      cd OHS_DOMAIN_HOME/bin
      
    2. Enter the following commands to stop and start the instance:
      ./stopComponent.sh ohs2
      ./startComponent.sh ohs2
      
Example 1   admin_vh.conf file
<VirtualHost WEBHOST1:7777>
    ServerName admin.example.com:80
    ServerAdmin you@your.address
    RewriteEngine On
    RewriteOptions inherit

# Admin Server and EM
<Location /console>
    WLSRequest ON
    WebLogicHost ADMINVHN
    WeblogicPort 7001
</Location>

<Location /consolehelp>
    WLSRequest ON
    WebLogicHost ADMINVHN
    WeblogicPort 7001
</Location>

<Location /em>
    WLSRequest ON
    WebLogicHost ADMINVHN
    WeblogicPort 7001
</Location>
</VirtualHost>
Example 2   wcpinternal_vh.conf file

Contents of this file:

<VirtualHost WEBHOST1:7777>
    ServerName wcpinternal.example.com:80
    ServerAdmin you@your.address
    RewriteEngine On
    RewriteOptions inherit

# WSM-PM
<Location /wsm-pm>
    WLSRequest ON
    WebLogicCluster WCCHOST1:7010,WCCHOST2:7010
    WLProxySSL OFF     
    WLProxySSLPassThrough OFF
</Location>
</VirtualHost>

11.7.6 Validating Access to the Management Consoles and Administration Server

To verify the changes you have made in this chapter:

  1. Use the following URL to the hardware load balancer to display the Oracle WebLogic Server Administration Console, and log in using the Oracle WebLogic Server administrator credentials:

    http://admin.example.com/console
    

    This validates that the admin.example.com virtual host on the load balancer is able to route requests to the Oracle HTTP Server instances on the web tier, which in turn can route requests for the Oracle WebLogic Server Administration Console to the Administration Server in the application tier.

  2. Similarly, you should be able to access the Fusion Middleware Control using a similar URL:

    http://admin.example.com/em
    

11.7.7 Validating Access to the Oracle Web Services Policy Manager

To verify that the Oracle HTTP Server virtual host and load-balancer for the internal URLs are configured correctly, also verify the WSM-PM configuration:

Use the following URL for the hardware load balancer to display the Oracle Web Services Policy Manager web interface, and log in using the Oracle WebLogic server administrator credentials.
http://wcpinternal.example.com/wsm-pm