Oracle HTTP Server (OHS) takes the Apache Web Server and significantly extends it. This article, the first of a five-part series, introduces you to the server. It is excerpted from chapter five of the book Oracle 10g Application Server Exam Guide, written by Sam Alapati (McGraw-Hill, 2006; ISBN: 0072262710).
Oracle HTTP Server (OHS) is OracleAS 10g's Web Server component and is based on the Apache 1.3 Web server. OHS handles client HTTP requests and can serve static and dynamic content in response. OHS supports Server Side Includes as well as providing load-balancing capabilities. As you probably know, the Apache Web server is the most popular Web server today on the Internet, hosting more Web sites than any other Web server. OHS extends the highly flexible, stable, and highly scalable Apache with several custom modules or "mods" in order to provide specialized Oracle functionality in addition to a high availability infrastructure that helps to manage process, death detection, and failover. You can also use the OHS to access several Oracle components such as Forms, Reports, and the OracleAS Portal via the Web. You can also access Oracle stored procedures through the OHS.
In the OHS directories, you'll often see a reference to Apache files. In fact, the base directory for the OHS is named $ORACLE_HOME/Apache/Apache directory. This is so because OHS is built from the basic Apache Web server, specifically, the Apache version 1.3.
Here are some of the salient features of OHS in relation to OracleAS 10g:
OHS supports SSL encryption based on industry standard algorithms. The SSL capability is special to the Oracle HTTP Server and isn't a part of the standard Apache Web server's capabilities.
OHS supports both standard authentication features of HTTP servers, storing credentials in flat files; it also supports the OracleAS Single Sign-On feature, with the help of the Oracle-supplied mod_osso module.
Using the virtual host feature, OHS can service multiple domain names over a single IP address. Virtual hosting capability is part of the core Apache Web server features.
OHJS provides support for distributed authoring and versioning (DAV), with the help of WebDav. Oracle's mod_oradav module provides support for this.
OHS supports URL rewriting so users don't have to change bookmarks in order to change URLs. The support for reverse proxy capabilities makes content provided by multiple servers appear as though it were coming from the same server. URL rewriting is a part of the Apache Web server's basic features.
Important OHS Components
OHS consists of the following important components:
HTTP Listener This is based on the Apache HTTP listener; it listens to and handles incoming connection requests.
Modules (mods) The OHS modules extend the functionality of the OHS Server. There are two types of modules: standard Apache modules and OracleAS-specific modules. In addition, OHS offers enhanced versions of the standard HTTP server (Apache) modules.
Perl Interpreter The final OHS component is a persistent PERL runtime environment, enabled by the mod_perl Apache module.
Oracle HTTP Server Modules
The Apache HTTP Server contains a core set of features, which are extended by the use of dynamic shared objects called modules. Modules are loaded into the HTTP Server when the server starts, and are used for extending the basic capabilities of the Apache server. Oracle HTTP Server includes the basic Apache HTTP server modules and additionally provides specialized Oracle-specific modules. These Oracle modules enhance the HTTP server's capabilities and enable its integration with other OracleAS components. Heres a brief description of the important Oracle-provided OHS modules:
mod_certheaders enables reverse proxy servers such as the OracleAS Web Cache to transfer SSL connection information to OHS, using HTTP headers. The information is transferred to the standard CGI environment variables from the certificate headers. Using certain mod_certheader directives, some HTTP requests can be treated as HTTPS requests.
mod_dms enables performance monitoring of various components using Oracle's Dynamic Monitoring Service (DMS).
mod_oc4j routes requests from the Oracle HTTP Server to the Oracle Application Server Containers for J2EE (OC4J).
mod_onsint provides integration support with Oracle Notification Service (ONS) and Oracle Process Manager and Notification Server (OPMN).
mod_oradav enables WebDAV clients to connect to an Oracle database and process information in various schemas. Mod_oradav is based on Apache's mod_dav module, which is how Apache implements the WebDAV specification. The WebDAV protocol helps multiple authors to work with Web content by letting them share and edit common files.
mod_ossl enables the OHS to use Secure Socket Layers (SSL), which enables the use of strong cryptography.
mod_osso supports the OracleAS Single Sign-On feature.
mod_plsql enables the Oracle HTTP Server to connect to an Oracle database and enables Web applications to use Oracle stored procedures, using the PL /SQL Gateway.
mod_wchandshake enables the OracleAS Web Cache to automatically discover the Oracle HTTP Server.
on the job: OHS doesn't load all the modules in the httpd.conf file automatically upon a start or restart. It dynamically loads the modules as and when they are needed.