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:
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".
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.
This section describes how to view ports using Fusion Middleware Control.
To view the port number usage using Fusion Middleware Control, do the following:
Navigate to the Oracle HTTP Server home page.
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:
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.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.To create ports using Fusion Middleware Control, do the following:
Navigate to the Oracle HTTP Server home page.
Select Administration from the Oracle HTTP Server menu.
Select Ports Configuration from the Administration menu.
Click Create.
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".
In Port, enter the port number.
Click OK.
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.To create the ports using Fusion Middleware Control, do the following:
Navigate to the Oracle HTTP Server home page.
Select Administration from the Oracle HTTP Server menu.
Select Ports Configuration from the Administration menu.
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.
Click Edit.
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".
Click OK.
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.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".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.To create a virtual Host using Fusion Middleware Control, do the following:
Navigate to the Oracle HTTP Server home page.
Select Administration from the Oracle HTTP Server menu.
Select Virtual Hosts from the Administration menu.
Click Create.
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>
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.
Use the Type field to select whether the virtual host will be IP-based or name-based.
Click OK.
Restart Oracle HTTP Server. See Section 4.3.4.
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:
Navigate to the Oracle HTTP Server home page.
Select Administration from the Oracle HTTP Server menu.
Select Virtual Hosts from the Administration menu.
Highlight an existing virtual host in the table.
Click Configure.
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.
Server Configuration: Configure basic virtual host properties, such as document root directory, installed modules, and aliases. See Section 4.5.1, "Specifying Server Properties by Using Fusion Middleware Control."
MIME Configuration: Configure MIME settings, which are used by Oracle HTTP Server to interpret file types, encodings, and languages. Section 4.6.3, "Configuring MIME Settings."
Log Configuration: Configure access logs that will record all requests processed by the virtual host. The logs contain basic information about every HTTP transaction handled by the virtual host. See Section 7.2, "Configuring Oracle HTTP Server Logs."
mod_perl Configuration: Configure the mod_perl module to embed the Perl interpreter into the virtual host, thereby eliminating startup overhead and enabling you to write modules in Perl. This module is disabled, by default. See Section 4.6.4, "Configuring mod_perl."
SSL Configuration: For instructions on configuring SSL using Fusion Middleware Control, see "Enabling SSL for Oracle HTTP Server Virtual Hosts" in the Administering Oracle Fusion Middleware.
mod_wl_ohs Configuration: Configure the mod_wl_ohs module to allow requests to be proxied from an Oracle HTTP Server to Oracle WebLogic Server. See Section 4.6.5, "Configuring the Oracle WebLogic Server Proxy Plug-In (mod_wl_ohs)."
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.
Restart Oracle HTTP Server. See Section 4.3.4, "Restarting Oracle HTTP Server Instances".