Oracle
  Home arrow Oracle arrow Page 3 - Directives, Access, and More with the ...
Dev Shed Forums 
Administration  
AJAX  
Apache  
BrainDump  
DHTML  
Flash  
Java  
JavaScript  
Multimedia  
MySQL  
Oracle  
Perl  
PHP  
Practices  
Python  
Reviews  
Security  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Forums Sitemap 
IBM® developerWorks 
Sun Developer Network 
Dedicated Servers 
E-Commerce Hosting 
Linux Web Hosting 
Managed Hosting 
Small Business Hosting 
Moblin 
JMSL Numerical Library 
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? 
ORACLE

Directives, Access, and More with the Oracle HTTP Server
By: McGraw-Hill/Osborne
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 3
    2007-02-08

    Table of Contents:
  • Directives, Access, and More with the Oracle HTTP Server
  • Directory Indexing
  • Using Aliases
  • Access Restriction Directives
  • Obtaining the HTTP Server Status

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb 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


    Directives, Access, and More with the Oracle HTTP Server - Using Aliases


    (Page 3 of 5 )

    The Alias directive maps URLs to file system locations. The file system location can be a file or a directory, as indicated in the syntax for the Alias directive shown here:

      Alias URL-path file-path|directory-path

    Using the Alias directive, you can store documents in directories other than the directory specified by the DocumentRoot directive. Here's an example:

    Alias /image /ftp/test/image

    In the preceding example, a client request for the http://myserver/image/foo.gif file will return the file /ftp/test/image/foo.gif. Here's another example, showing how you can create an entire virtual path structure to hide the underlying file system:

      Alias /pub /public
      Alias /pub/users /home/users/pub 
      Alias
    /pub/users/john /support/staff/john/public

    on the job:  If you include a trailing / on the url-path, the server will require a trailing / in order to expand the alias.

    You can also specify additional <Directory> sections, which cover the destination of aliases. Because OHS checks aliases before it checks the <Directory> containers, only the destinations of the aliases are affected. Heres an example:

      Alias /image /ftp/test/image
      <Directory /ftp/test/image>
      Order allow,deny
      Allow from all
      </Directory>

    If you've already specified access control for the /ftp/test /image directory, using the Alias directive as shown here will modify the access settings for that directory and its subdirectories.

    If you're creating aliases to directories outside the directory specified by DocumentRoot, you must ensure that the server has access to the target directory.

    AliasMatch

    The AliasMatch directive works similar to the way the Alias directive does, but it uses standard regular expressions instead of simple prefix matching. If the regular expression matches the URL-path, any parenthesized matches are substituted into the given string and used as a filename. Here's an example, which shows how the AliasMatch directive activates the /icons directory:

      AliasMatch ^/icons(.*) /usr/local/apache/icons$1

    A reference to the icons directory in a URL will be redirected to the real icons directory.

    ScriptAlias

    The ScriptAlias directive works like the Alias directive, with the difference that it marks the target directory as containing CGI scripts to be executed by the mod_cgi's cgi-script handler. URLs will be mapped to scripts beginning with the second

    exam watch: Using ScriptAlias is the
    only way to enable the execution of CGI
    scripts without specifying the ExecCGI
    option, and therefore is useful if you
    have a policy of not permitting users to
    execute their own CGI scripts.

     

    argument, which refers to a full path name in the local file system. Heres an example:

      ScriptAlias /cgi-bin/ /web/cgi-bin/

    In the foregoing example, a request for http://myserver/cgi-bin/foo would result in the HTTP server's running the script /web/cgi-bin/foo.

    More Oracle Articles
    More By McGraw-Hill/Osborne


       · This article is an excerpt from the book "Oracle 10g Application Server Exam Guide,"...
     

    Buy this book now. 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). Check it out today at your favorite bookstore. Buy this book now.

       

    ORACLE ARTICLES

    - 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...
    - Sub-templates and More with Oracle HTML DB





    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway