6 Managing Connectivity

This chapter describes how to manage Oracle HTTP Server connectivity. It includes procedures for viewing port number usage, managing ports, and configuring virtual hosts.

This chapter includes the following sections:

6.1 Default Listen Ports

Oracle HTTP Server comes configured with two listen ports: a non-SSL port (http) and an SSL port (https). The default, non-SSL port is 7777. If port 7777 is occupied, the next available port number, within a range of 7777-7877, is assigned. The default SSL port is 4443. Similarly, if port 4443 is occupied, the next available port number, within a range of 4443-4543, is assigned.

You can set these ports when you create the instance or modify the instance configuration later. Automatic port assignment occurs only if you use createOHSInstance() or Fusion Middleware Control. You must do your own port management if you create instances by using the Configuration Wizard.

For information about specifying ports when creating a new Oracle HTTP Server component, see Section 4.2, "Creating an OHS Instance".

6.2 Defining the Admin Port

The Admin or Proxy MBean port is an additional SSL port (9999) that is used internally by Oracle HTTP Server to communicate with Fusion Middleware Control. It is also used to monitor Oracle HTTP Server through Node Manager. This port is configured to run out-of-the-box in the admin.conf file; however, if for any reason you need to use the default port for another purpose, you can reconfigure the Admin port by using the Configuration Wizard to update the domain and manually reset ports there.

6.3 Viewing Port Number Usage

This section describes how to view ports using Fusion Middleware Control.

6.3.1 Using the Fusion Middleware Control to View Port Number Usage

To view the port number usage using Fusion Middleware Control, do the following:

  1. Navigate to the Oracle HTTP Server home page.

  2. Select Port Usage from the Oracle HTTP Server menu.

    The Port Usage detail page shows the component, the ports that are in use, the IP address the ports are bound to, and the protocol being used, as illustrated in the following figure:

    Description of ports2.gif follows
    Description of the illustration ports2.gif

6.4 Managing Ports

The ports used by Oracle HTTP Server can be set during and after installation. In addition, you can change the port numbers, as needed. This section describes how to create, edit, and delete ports using Fusion Middleware Control.

Caution:

The Oracle HTTP Server administration (proxy MBean) virtual host and its configuration, defined in the admin.conf file, must not be edited with the WebLogic Scripting Tool (WLST).

See Also:

"Changing the Oracle HTTP Server Listen Ports" in the Administering Oracle Fusion Middleware.
Description of ports_config.gif follows
Description of the illustration ports_config.gif

Note:

When deleting a port, if there is a virtual host configured to use the port you want to delete, you must first delete that virtual host before deleting the port.

6.4.1 Using Fusion Middleware Control to Create Ports

To create ports using Fusion Middleware Control, do the following:

  1. Navigate to the Oracle HTTP Server home page.

  2. Select Administration from the Oracle HTTP Server menu.

  3. Select Ports Configuration from the Administration menu.

  4. Click Create.

    Description of ports_config_new.gif follows
    Description of the illustration ports_config_new.gif

  5. Use the IP Address menu to select an IP address for the new port. Ports can listen on a local IP Address of an associated host or on any available network interfaces.

    SSL for a port can be configured on the Virtual Hosts page, as described in Section 6.5.2, "Using Fusion Middleware Control to Configure Virtual Hosts".

  6. In Port, enter the port number.

  7. Click OK.

  8. Restart Oracle HTTP Server. See Section 4.3.4.

Note:

If you change the port or make other changes that affect the URL, such as changing the host name, enabling or disabling SSL, you need to re-register partner applications with the SSO server using the new URL. For more information, see "Registering Oracle HTTP Server mod_osso with OSSO Server 10.1.4" in Securing Applications with Oracle Platform Security Services.

6.4.2 Using Fusion Middleware Control to Edit Ports

To create the ports using Fusion Middleware Control, do the following:

  1. Navigate to the Oracle HTTP Server home page.

  2. Select Administration from the Oracle HTTP Server menu.

  3. Select Ports Configuration from the Administration menu.

  4. Select the port for which you want to change the port number.

    The Admin port cannot be edited by using Fusion Middleware Control. Although this is a port Oracle HTTP Server uses for its internal communication with Fusion Middleware Control, in most of the cases it does not need to be changed. If you really want to change it, manually edit the DOMAIN_HOME/config/fmwconfig/components/OHS/componentName/admin.conf file.

  5. Click Edit.

    Description of ports_config_create.gif follows
    Description of the illustration ports_config_create.gif

  6. Edit the IP Address and/or Port number for the port.

    SSL for a port can be configured on the Virtual Hosts page, as described in Section 6.5.2, "Using Fusion Middleware Control to Configure Virtual Hosts".

  7. Click OK.

  8. Restart Oracle HTTP Server. See Section 4.3.4.

Note:

If you change the port or make other changes that affect the URL, such as changing the host name, enabling or disabling SSL, you need to re-register partner applications with the SSO server using the new URL.

6.4.3 Disabling a Listening Port in a Standalone Environment

While you can use Fusion Middleware Control to disable a listen port in a WebLogic Server environment, to do so in a standalone environment, you must directly update master configuration file (DOMAIN_HOME/config/fmwconfig/components/OHS/componentName/httpd.conf) by commenting-out the line where port is exposed; for example:

#Listen slc01qtd.us.myCo.com:7777

Note:

Before attempting to edit any .conf file, you should familiarize yourself with the layout of the configuration file directories, mechanisms for editing the files, and learn more about the files themselves. For this information, see Section 1.6, "Understanding Configuration Files".

6.5 Configuring Virtual Hosts

You can create virtual hosts to run more than one website (such as www.company1.com and www.company2.com) on a single machine. Virtual hosts can be IP-based, meaning that you have a different IP address for every website, or name-based, meaning that you have multiple names running on each IP address. The fact that they run on the same physical server is not apparent to the end user.

Caution:

The Oracle HTTP Server administration (proxy MBean) virtual host and its configuration, defined in the admin.conf file, must not be edited with the WebLogic Scripting Tool (WLST).

This section describes how to create and edit virtual hosts using Fusion Middleware Control.

See Also:

For more information about virtual hosts, refer to the Apache HTTP Server documentation.
Description of virtual_hosts.gif follows
Description of the illustration virtual_hosts.gif

6.5.1 Using Fusion Middleware Control to Create Virtual Hosts

To create a virtual Host using Fusion Middleware Control, do the following:

  1. Navigate to the Oracle HTTP Server home page.

  2. Select Administration from the Oracle HTTP Server menu.

  3. Select Virtual Hosts from the Administration menu.

  4. Click Create.

    Description of virtual_hosts_create.gif follows
    Description of the illustration virtual_hosts_create.gif

  5. Enter a name for the virtual host field and then choose whether to enter a new listen address or to use an existing listen address.

    • New listen address - use this option when you want to create a virtual host that maps to a specific hostname or IP address, for example mymachine.com:8080. This will create following type NameVirtualHost and VirtualHost directives:

      NameVirtualHost mymachine.com:8080
      <VirtualHost mymachine.com:8080>
      
    • Use existing listen address - use this option when you want to create a virtual host using an existing listen port and the one that maps to all IP addresses. This will create following type VirtualHost directive:

      <VirtualHost *:8080>
      
  6. Enter the remaining attributes for the new virtual host.

    • Server Name—the name of the server for Oracle HTTP Server

    • Document Root— documentation root directory that forms the main document tree visible from the website

    • Directory Index—the main (index) page that will be displayed when a client first accesses the website

    • Administrator's E-mail Address—the e-mail address that the server will include in error messages sent to the client

    • Type—Virtual hosts can be IP-based, meaning that you have a different IP address for every website, or name-based, meaning that you have multiple names running on each IP address.

  7. Use the Type field to select whether the virtual host will be IP-based or name-based.

  8. Click OK.

  9. Restart Oracle HTTP Server. See Section 4.3.4.

6.5.2 Using Fusion Middleware Control to Configure Virtual Hosts

You can use the options on the Configure menu to specify Server, MIME, Log, mod_perl, SSL, and mod_wl_ohs configuration for a selected virtual host.

To configure a virtual host using Fusion Middleware Control, do the following:

  1. Navigate to the Oracle HTTP Server home page.

  2. Select Administration from the Oracle HTTP Server menu.

  3. Select Virtual Hosts from the Administration menu.

  4. Highlight an existing virtual host in the table.

  5. Click Configure.

    Description of virtual_hosts_config.gif follows
    Description of the illustration virtual_hosts_config.gif

  6. Select one of the following options from Configure menu to open its corresponding configuration page. The values on these pages apply only to the virtual host. If the fields are blank, the virtual host uses the values configured at the server level.

  7. Review the settings on each configuration page. If the settings are correct, click OK to apply the changes. If the settings are incorrect, or you decide to not apply the changes, click Cancel to return to the original settings.

  8. Restart Oracle HTTP Server. See Section 4.3.4, "Restarting Oracle HTTP Server Instances".