Home arrow Oracle arrow Configuring the Oracle HTTP Server

Configuring the Oracle HTTP Server

In the second article in a five-part series covering the Oracle HTTP Server (OHS), you will learn about server configuration directives, including access control directives and others. This article is excerpted from chapter five of the book Oracle 10g Application Server Exam Guide, written by Sam Alapati (McGraw-Hill, 2006; ISBN: 0072262710).

  1. Configuring the Oracle HTTP Server
  2. Access Control Directives
  3. Administration Directives
  4. Managing Processes and Connections
By: McGraw-Hill/Osborne
Rating: starstarstarstarstar / 4
January 18, 2007

print this article



Basic Oracle HTTP Server Configuration Directives

There are several configuration directives that you can use to configure basic things such as the directories from which OHS will serve static Web documents or the directories for storing the error logs. You also have directives that help configure access control by specifying the server and port names.

When I discuss the OHS processing model subsequently in the chapter, I discuss several OHS processing-related directives, such as those that determine whether persistent browser-server connections should be maintained and for how long. Finally, in the last part of this chapter, I explain several OHS configuration directives that are applied under a limited scope instead of being applicable to the entire OHS server. I also explain some special OHS directives that limit or enable several OHS features in a later section in this chapter. In the following sections, I discuss three types of basic OHS configuration directives:

  1. File Location Specification directives
  2. Access Control directives
  3. Administration directives

Let's start by discussing the simple OHS configuration directives, starting with directives that let you configure the location of various OHS server files.

File Location Specification Directives

There are several important directives that govern the location of various OHS server files. The following directives can be specified in the server configuration context.

ServerRoot    The ServerRoot directive by default specifies the main OHS or base directory for the OHS server installation, underneath which lie the subdirectories where the binaries, log files, configuration files, and other documents such as HTML files are located. Typically, the ServerRoot directive points to the $ORACLE_HOME /Apache directory. The directory specified by the ServerRoot directive usually contains the subdirectories bin, conf, htdocs, and logs. It's important to remember that often, other configuration directives use ServerRoot as part of their relative path name.

  Example: ServerRoot /usr/local/ohs

PidFile   The PidFile directive lets you specify the location of the PID file. The PID file contains the Process ID of the OHS server. If you don't begin the
filename with a slash (/), the path is relative to the ServerRoot directory.

ScoreBoardFile   The ScoreBoardFile directive is an optional directive required only under some systems; it helps to set the location of a file used by the main control server process to communicate with the child processes. You can check for the presence of the ScoreBoardFile on your system by seeing whether an active OHS server has created this file. Usually, only Windows-based OHS implementations will have the ScoreBoardFile.

OHS uses a scoreboard to record communications between the parent and child processes. Some architectures may be able to maintain this "scoreboard" in memory, but some others actually require a physical file to do so. If you use this directive, OHS will create a file on disk to record the communication details. Here's how you use the ScoreBoardFile directive:

  ScoreBoardFile /var/run/apache_status

CoreDumpDirectory   The CoreDumpDirectory is found only in UNIX systems and is the directory location where the OHS server will try to switch before dumping core dumps. By default, the CoreDumpDirectory is set to the same value as the ServerRoot directory. However, you must use the CoreDumpDirectory directive to specify a more secure location, because you don't

exam watch:  The OHS recognizes changes to the main configuration files only when you start or restart the server.

want the server, running as just any user, to be able to write to the all-important ServerRoot directory, which holds critical OHS binaries and configuration files in its various subdirectories.

DocumentRoot    This directory is where the HTTP Server stores and serves files from, and the default location is the htdocs directory, whish is relative to the ServerRoot directory. The directory specified by DocumentRoot is the main document visible to a Web browser. This directory location allows public access to all pages, so you mustn't keep sensitive information here.

Unless you use a directive such as Alias, the HTTP Server will append the requested URL's path to the document root to make the complete path to the document. Here's a simple example that illustrates this point:

  documentRoot /usr/web

In the preceding example, when a user accesses http://www.myhost.com/index. html, the user will be referred to /usr/web/index.html.

Note that you must specify DocumentRoot without a trailing slash.

ErrorLog    The ErrorLog directive sets the name of the HTTP Server log file, and by default it is logs/error_log. Note that this path is relative to the ServerRoot

exam watch:  By default, the error log path name is relative to the ServerRoot directory.

directory. Thus, if the ServerRoot directory is specified as /usr/web/ohs, then the error log files will be located in the /usr/web/ohs/logs directory. You can also specify an alternative pathname by explicitly providing the entire pathname of the alternative directory. The two important OHS log files are the access log and the error log.

>>> More Oracle Articles          >>> More By McGraw-Hill/Osborne

blog comments powered by Disqus
escort Bursa Bursa escort Antalya eskort


- Oracle Java Security Woes Continue
- Oracle's New IaaS Cloud Option: There's a Ca...
- Oracle Acquires Eloqua to Boost Cloud Presen...
- Choosing Innovation: Oracle Survey Insights
- Oracle Fixes Privilege Escalation Bug
- Oracle`s Communications Service Availability...
- Oracle Releases Exalytics, Taleo Plans
- Oracle Releases Communications Network Integ...
- Oracle Releases Communications Data Model 11...
- Oracle Releases PeopleSoft PeopleTools 8.52
- Oracle Integrates Cloudera Apache Distro, My...
- Oracle Releases MySQL 5.5.18
- Oracle Announces NoSQL Database Availability
- Sorting Database Columns With the SELECT Sta...
- Retrieving Table Data with the LIKE Operator

Developer Shed Affiliates


Dev Shed Tutorial Topics: