Oracle
  Home arrow Oracle arrow Page 2 - 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 - What Are Block Directives?
    ( Page 2 of 4 )

    A block directive specifies conditions under which the directive will take effect. Thus, block directives aren't scope based, but rather depend on whether the HTTP Server will take its directives into account when starting up, based on some condition holding true or false. You can use block directives to limit directives to work only on certain virtual hosts, directories, or files. There are two block directives: <IfModule> and <IfDefine>.

    <IfModule>

    You use the <IfModule> directive to mark those directives that are processed only if a certain module is present and is available in the OHS server. The stated module can be made available to OHS in either of two ways. It can be statically compiled into the OHS server, or you must make the module dynamically available by compiling the module and placing a LoadModule line in the httpd.conf file. The LoadModule line must appear before the <IfModule> directive.

    Here’s an example using the <IfModule> directive that comes into effect only for the mod_user_dir.c module:

      <IfModule mod_userdir.c>
      UserDir public_html
      </IfModule>

    Any URL whose path starts with a tilde would be mapped to UserDir, provided the mod_userdir.c module exists. Otherwise, the <IfModule> directive has no effect.

    <IfDefine>

    As you're probably aware, in the Apache HyperText Transfer Protocol (HTTP) server program, the httpd daemon, when run as a standalone process, creates child processes or threads to handle user service requests. You normally don't invoke the httpd daemon directly, but rather do so through using the apachectl utility on Apache systems, and the opmnctl utility in Oracle HTTP Server.

    The directives within an <IfDefine> section are processed only if the enclosed test is evaluated to be true; otherwise, everything between the two
    <IfDefine> section markers is ignored. The <IfDefine> directive uses the parameter-name argument given on the httpd command line via the -D parameter. Note that the <IfDefine>directive is thus used for conditionally processing directives, based on the evaluation of the conditions that prevail when the OHS server is started. OHS will apply the directives within the <IfDefine> directive only if the stated parameter
    is defined on the httpd command line. In the following example, requests will be redirected to alternative sites only if you start the OHS server with the httpd
    --DclosedForNow option.

      <IfDefine ClosedForNow>
      Redirect /
    http://otherserver.example.com/
      </IfDefine>

    By using the parameter-name specification, you can reverse the test and process directives within the <IfDefine> sections if the parameter name isn't
    defined.

    Note that containers can't include other containers, with the exception of the Limit directive and the Files container. You can include a Files container in a
    Directory container. You can place any directive inside a Limit or LimitExcept container, as long as the Limit or LimitExcept directive is placed within a container that conforms to these directives. You can include all the other container types inside a <VirtualHost> container.



     
     
    >>> 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 1 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek