This chapter includes the following sections:
Automatic port assignment occurs only if you use ohs_createInstance()
or Fusion Middleware Control. The default, non-SSL port is 7777. If port 7777 is occupied, the next available port number, within a range of 7777-65535, is assigned. The default SSL port is 4443. Similarly, if port 4443 is occupied, the next available port number, within a range of 4443-65535, is assigned.
If you create instances using Configuration Wizard, then you must perform your own port management. The Configuration Wizard has no automatic port assignment capabilities.
For information about specifying ports when creating a new Oracle HTTP Server component, see Creating an OHS Instance.
Automatic Admin port assignment occurs only if you use ohs_createInstance()
or Fusion Middleware Control. The Admin port is used internally by Oracle HTTP Server to communicate with Node Manager. This port is configured in the admin.conf
file.
If you create instances using Configuration Wizard, then you must perform your own Admin port management. The Configuration Wizard has no automatic port assignment capabilities.
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 or WLST.
You can view how ports are assigned on the Fusion Middleware Control Port Usage detail page. To view the port number usage using Fusion Middleware Control, do the following:
If you are using Oracle HTTP Server in collocated mode, then you can use WLST commands to view the port number information on a given instance.
WLST will return a value similar to the following:
array(java.lang.String,['7777', '4443', '127.0.0.1:9999'])
Note:
You can also cd
into the directory of the master copy of the OHS config files and do a grep
for the Listen directives.
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 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.
You create a port for an Oracle HTTP Server endpoint on the Fusion Middleware Control Create port page. To create ports using Fusion Middleware Control, do the following:
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.
You can edit the values for existing ports on the Fusion Middleware Control Edit Port page. To edit the ports using Fusion Middleware Control, do the following:
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 staging configuration file 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 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 virtual host and its configuration, defined in the admin.conf file, must not be edited with the WebLogic Scripting Tool (WLST).
The current release of Oracle HTTP Server enables you to use IPv6 and IPv4 addresses as the virtual host name.
You can also configure multiple addresses for the same virtual host; that is, a virtual host can be configured to serve on multiple addresses. This allows requests to different addresses to be served with the same content from the same virtual host.
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.
You can create a virtual host for Oracle HTTP Server on the Fusion Middleware Control Create Virtual Hosts page. To create a virtual host using Fusion Middleware Control, do the following:
Removing Unnecessary Listen Directives
Creating a virtual host by using Fusion Middleware Control also adds the Listen directive for the virtual host. However, virtual host creation will add unnecessary Listen directives in the following situations:
A virtual host is being created for one host name and the Listen directive already exists for the different host name resolving to the same IP address.
A virtual host is being created for one host name and the Listen directive already exists for the IP address that the host name resolves to.
A virtual host is being created for multiple host names that resolve to the same IP address.
In these situations, Oracle HTTP Server will fail to start because there are multiple Listen directives for the same IP address. You must remove any extra Listen directives configured for the same IP address.
You can use the options on the Configure menu of the Virtual Hosts page to specify Server, MIME, Log, SSL, and mod_wl_ohs configuration for a selected virtual host.
To configure a virtual host using Fusion Middleware Control, do the following: