Home arrow Oracle arrow Page 3 - Understanding Directives and More with the Oracle HTTP Server

Merging Containers and Contents - Oracle

In this fourth article in a five-part series, you'll learn about block directives, virtual hosting, and more as they apply to the Oracle HTTP Server (OHS). It is excerpted from chapter five of the book Oracle 10g Application Server Exam Guide, written by Sam Alapati (McGraw-Hill, 2006; ISBN: 0072262710).

TABLE OF CONTENTS:
  1. Understanding Directives and More with the Oracle HTTP Server
  2. What Are Block Directives?
  3. Merging Containers and Contents
  4. Virtual Hosting
By: McGraw-Hill/Osborne
Rating: starstarstarstarstar / 4
February 01, 2007

print this article
SEARCH DEV SHED

TOOLS YOU CAN USE

advertisement

The Oracle HTTP Server merges multiple directives in a very particular order, with directories being searched from the top down, as shown here:

  1. Directories inside (non-regular expression) directory containers and .htaccess directives are processed simultaneously. The .htaccess directories, if they are allowed, will always override the Directory container directives.
  2. Next to be applied are the DirectoryMatch containers and the Directory containers.
  3. Files and FilesMatch container directives are merged simultaneously next.
  4. Location and LocationMatch directives are applied simultaneously last.

Each group is processed in the order it appears in the httpd.conf file, except for the <Directory> containers. The <Directory> containers are processed from the shortest directory component to the largest directory component. For example, OHS will process /usr/web/dir before it processes /usr/web/dir/sub_dir. If more than one <Directory> container refers to the same directory, they are processed in the order in which they appear in the httpd.conf file.

Directives inside the <VirtualHost> container are applied after the corresponding directives from the main server are applied. This allows virtual host configuration directives to override the main server configuration settings.

The following example shows how containers are merged, when all the containers are applied to a particular client request. The merging starts at 1 and ends at 5.

  <Location />
  5
  </Location>
  <Files f.html>
  4
  </Files>
  <VirtualHost *>
  <Directory /a/b>
  2
  </Directory>
  </VirtualHost>
  <DirectoryMatch "^.*b$">
  3
  </DirectoryMatch>
  <Directory /a/b>
  1
  </Directory>

The following example shows that although you placed some access restrictions, given that the <Location> container is evaluated last, your access restrictions specified in the <Directory> container don't actually apply.

  <Location />
  Order deny,allow
  Allow from all
  </Location>
  # <Directory> section's directive
  # will be ignored since <Location>
is processed after this
  <Directory />
  Order allow,deny
  Allow from all
  Deny from hacker.example.com
  </Directory>

exam watch:   Directives that share the same scope will be merged in the order they are found.

Note that the VirtualHost container directives are processed after the main server configuration directives. This allows the virtual host directives to take precedence over the main server directives.

The Oracle HTTP Server processes all section groups in the order in which they appear in the configuration files, with one exception. The Directory container (<Directory>) sections are processed from the shortest directory component to the longest. Here are some things to remember:

  1. Use the <Directory> or <Files> directives to match objects at the file system level.
  2. Use the <Location> directive to match URLs.
  3. The <Location> container is always processed last.



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

blog comments powered by Disqus
escort Bursa Bursa escort Antalya eskort
   

ORACLE ARTICLES

- 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: