Oracle
  Home arrow Oracle arrow Page 3 - Understanding Directives and More with the Oracle HTTP Server
Dev Shed Forums  
Administration  
AJAX  
Apache  
BrainDump  
DHTML  
Flash  
Java  
JavaScript  
Multimedia  
MySQL  
Oracle  
Perl  
PHP  
Practices  
Python  
Reviews  
Security  
Smartphone Development  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Mobile Linux  
App Generation ROI  
IBM® developerWorks  
Forums Sitemap  
E-Commerce Hosting  
Linux Web Hosting  
Managed Hosting  
Small Business Hosting  
VPS Hosting  
Weekly Newsletter

 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid  
Request Media Kit
Contact Us  
Site Map  
Privacy Policy  
Support  
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
Google.com  
ORACLE

Understanding Directives and More with the Oracle HTTP Server
By: McGraw-Hill/Osborne
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: starstarstarstarstar / 4
    2007-02-01


    Table of Contents:
  • Understanding Directives and More with the Oracle HTTP Server
  • What Are Block Directives?
  • Merging Containers and Contents
  • Virtual Hosting

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      error-file:tidyout.log Del.ici.ous error-file:tidyout.log Digg
      error-file:tidyout.log Blink error-file:tidyout.log Simpy
      error-file:tidyout.log Google error-file:tidyout.log Spurl
      error-file:tidyout.log Y! MyWeb error-file:tidyout.log Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article

     
     
    ADVERTISEMENT


    Understanding Directives and More with the Oracle HTTP Server - Merging Containers and Contents
    ( Page 3 of 4 )

    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
     

       

    ORACLE ARTICLES

    - Oracle's Turn to Play in the Sun
    - Implementing and Using Oracle`s Restore Poin...
    - Tuning PL/SQL Code
    - Debugging PL/SQL Code
    - Testing PL/SQL Code
    - Working With PL/SQL Code
    - Conditional Compilation for Oracle Database ...
    - Compile-Time Warnings for Oracle DB 10g
    - Compiling PL/SQL Code for an Oracle Database
    - Troubleshooting PL/SQL Code
    - Managing PL/SQL Code
    - Data Manipulation and More for HTML DB Appli...
    - Oracle Database Fundamentals
    - Adding Processes to HTML DB Applications
    - Adding Computations, Processes, and Validati...





    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 2 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek