HomeOracle Page 4 - Managing the Oracle HTTP Server
OHS Directives - Oracle
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).
Directives are configuration instructions that govern the behavior of the OHS Server, and there is one directive per line in the OHS configuration files. OHS directives let you customize the Web server for your organization's needs. All you have to do to configure OHS is to simply make changes to the httpd.conf file. Throughout this chapter, the various OHS configuration directives are explained in detail. In fact, most of this chapter is devoted to the explanation of various OHS configuration directives. A given configuration directive can't arbitrarily be used anywhere you want. You can use each directive in a specific context. There are four contexts in which the configuration directives can be applied:
Server config A directive is said to have a server config context if it can be used only in the main server configuration file ( httpd.conf ) and not inside any scope-limiting containers such as <Directory> and <VirtualHost>. You can't use these directives in . htaccess files either.
virtual host A directive that has a virtual host context can be placed only within the <VirtualHost> containers in the server configuration files.
directory A directive in the directory context can be used in the main server configuration file, but only within the <Directory>, <Location>, and <Files> containers.
htaccess A directory that's valid in the . htaccess context, can be placed only inside the per-directory .htaccess files. Of course, depending on the override settings, the file itself may or may not be processed.
Depending on the context in which the server issues a directive, there are three classes of directives, as described in the following paragraphs.
Global Global directives belong to the server configuration context and apply to the entire OHS server. All directives inside the httpd.conf file are global directives, except the so-called container directives (more on this later), which limit the scope of a directive to only a certain area of the OHS. For example, you may want directives in the httpd.conf file not to apply to the entire server but to be restricted only to particular files and directories, or only to certain hosts and URLs. You can then use the various available OHS containers such as <Files>, <Directories>, and <VirtualHost>, to limit the scope of these configuration directives. As another example, the virtual host container limits the directives inside it only to virtual hosts and not the main server. Container directives are always enclosed in start and end tags (e.g., <Virtual Host> and </VirtualHost>).
Per Server The per-server class of directives can have a server configuration or a virtual host context. In the httpd.conf file, all directives outside the <VirtualHost> container are the per-server class directive for the main server and are in the server configuration context. Similarly, all directives inside the <VirtualHost> container are directives in the virtual host context and apply only to virtual hosts and not to the main server.
exam watch: A container allows youto limit the scope of the configuration directives only to a specific area instead of the entire server. OHS applies any directives within a container to the area specified by the container.
Per Directory The per-directory class directives can belong to any of the four contexts: server configuration, virtual host, directory, or . htaccess . You can use these directives anywhere.
exam watch: Directives are alwaysapplied hierarchically, with a directive overriding all directives in the tiers that are above it.
Here's the syntax for specifying a configuration directive (server level) in the httpd.conf file:
The KeepAlive directive, which is discussed in more detail later on, enables the OHS to maintain persistent connections to the client instead of automatically closing a connection after each request by the client.
Please check back next week for the continuation of this article.