Skip Headers
Oracle® HTTP Server Administrator's Guide
10g Release 2 (10.2)

Part Number B14190-01
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Master Index
Master Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
View PDF

5 Managing the Network Connections

This chapter provides information about specifying IP addresses and ports, managing server interaction, and network connection persistence.

Topics discussed are:

Documentation from the Apache Software Foundation is referenced when applicable.

Note:

Readers using this guide in PDF or hard copy formats will be unable to access third-party documentation, which Oracle provides in HTML format only. To access the third-party documentation referenced in this guide, use the HTML version of this guide and click the hyperlinks.

5.1 Specifying Listener Ports and Addresses

When Oracle HTTP Server is installed, by default, it attempts to assign port 7777 as the non-SSL listener port. If port 7777 is occupied, it attempts to assign the next available port number in the range of 7777-7877. Thus, if port 7777 is busy, it would attempt to assign port 7778, and so on.

A filed named setupinfo.txt is automatically generated in ORACLE_HOME/Apache/Apache on UNIX and ORACLE_HOME\Apache\Apache on Windows. It contains the listener port number for Oracle HTTP Server. This file is generated at installation time, and is not updated thereafter. If you change the Oracle HTTP Server listener port number after installation, the information in this file becomes inaccurate.

You can change the Oracle HTTP Server listener port (SSL and non-SSL) after installation. If you make a port change, then you must also update other components to use the new port number.

See Also:

"Oracle Application Server Administrator's Guide"

You can specify that the server listens on more than one port, selected addresses, or a combination. The following directives, located in the "Global Environment" of the httpd.conf file, specify listener ports and addresses. Note that BindAddress and Port can be used only once. Apache group recommends the use of Listen instead.

5.1.1 BindAddress

Restricts the server to listen to a single IP address. If the argument to this directive is *, then it listens to all IP addresses. This directive has been deprecated. Listen offers similar functionality.

For example: BindAddress *

See Also:

"BindAddress directive" in the Apache Server documentation.

5.1.2 Port

Specifies the port of the listener, if no Listen or BindAddress are present. If Listen is present, the Port value becomes the default port value that is used when Oracle HTTP Server builds URLs, or other references to itself. Usually, the values of Port and Listen should match, unless Oracle HTTP Server is fronted by a caching, or proxy server. Then, you can set Port to be the port that is being used by the front end server, and Listen to the port that Oracle HTTP Server is actually listening to. By doing this, redirects or other URLs generated by Oracle HTTP Server point to the front-end server rather than directly to Oracle HTTP Server.

An example of the Port directive with a specified port is:

Port 7779

See Also:

"Port directive" in the Apache Server documentation.

5.1.3 Listen

Specifies an IP port that Oracle HTTP Server listens on. Multiple Listen directives can be used to listen on multiple ports. If present, this value will override the value of Port. Accordingly, if you have a Port value of 7777 and a Listen value of 7778, then Oracle HTTP Server only listens on one port, 7778.

Some examples of the Listen directive with specified ports are:

  • Listen 7778

  • Listen 12.34.56.78:80

See Also:

""Listen directive" in the Apache Server documentation.

5.2 Managing Interaction Between Server and Network

The following directives are used to specify how the server interacts with the network. They are located in the "Global Environment" of the httpd.conf file.

5.2.1 ListenBackLog

Specifies the maximum length of the queue of pending connections. This is useful if the server is experiencing a TCP SYN overload, which causes numerous new connections that open up, but do not complete the task.

See Also:

"ListenBackLog directive" in the Apache Server documentation.

5.2.2 SendBufferSize

Increases the TCP buffer size to the number of bytes specified, thereby improving performance.

See Also:

"SendBufferSize directive" in the Apache Server documentation.

5.2.3 TimeOut

Sets the maximum time, in seconds, that the server waits for the following:

  • The total amount of time it takes to receive a GET request.

  • The amount of time between receipt of TCP packets on a POST or PUT request.

  • The amount of time between ACKs on transmissions of TCP packets in responses.

The default is 300 seconds.

See Also:

"TimeOut directive" in the Apache Server documentation.

5.3 Managing Connection Persistence

The following directives determine how the server handles persistent connections. They are located in the "Global Environment" of the httpd.conf file.

5.3.1 KeepAlive

Enables HTTP 1.1 keep-alive support, allowing reuse of the same TCP connection for multiple HTTP requests from a single client, when set to "On". The default is "On".

See Also:

"KeepAlive directive" in the Apache Server documentation.

5.3.2 KeepAliveTimeout

Sets the number of seconds the server waits for a subsequent request before closing a KeepAlive connection. Once a request has been received, the timeout value specified by the TimeOut directive applies. The default is 15 seconds.

See Also:

"KeepAliveTimeout directive" in the Apache Server documentation.

5.3.3 MaxKeepAliveRequests

Limits the number of requests allowed per connection when KeepAlive is on. If it is set to "0", unlimited requests will be allowed. The default is 100.

See Also:

"MaxKeepAliveRequests directive" in the Apache Server documentation.

5.4 Configuring Reverse Proxies and Load Balancers

By default, Oracle Database installs using the local hostname as set up by ServerName directive in Oracle HTTP Server. Most Web sites tend to have a specific hostname or domain name for their Web or application server. However, this is not possible out of the box because with the ServerName directive, Oracle HTTP Server is instantiated with the local host.

Example 5-1 Using Reverse Proxies and Load Balancers with Oracle HTTP Server

Domain Name: www.oracle.com:80 123.456.7.8 (hosted on a reverse proxy, load balancer, or firewall)

Host Name of Oracle Database Host: server.oracle.com 123.456.7.9

ServerName and Port of Oracle Database Host: server.oracle.com:7777

Make the following changes in the httpd.conf file:

Port 80 
Listen 7777 
Listen 80 
# Virtual Hosts 
# This section is mandatory for URLs that are generated by 
# the PL/SQL packages of the Oracle Portal and various other components 
# These entries dictate that the server should listen on port 
# 7777, but will assert that it is using port 80, so that 
# self-referential URLs generated specify www.oracle.com:80 
# This will create URLs that are valid for the browser since 
# the browser does not directly see the host server.oracle.com. 
NameVirtualHost 123.456.7.9:7777 
<VirtualHost server.oracle.com:7777> 
ServerName www.oracle.com 
Port 80 
</VirtualHost> 
# Since the previous virtual host entry will cause all links 
# generated by the Oracle Portal to use port 80, the server.company.com 
# server needs to listen on 80 as well since the Parallel Page 
# Engine will make connection requests to Port 80 to request the 
# portlets. 
NameVirtualHost 123.456.7.9:80 
<VirtualHost server.oracle.com:80> 
ServerName www.oracle.com 
Port 80 
</VirtualHost> 

See Also:

"Running Oracle HTTP Server as Root" for instructions on running Oracle HTTP Server with ports less than 1024.