Skip Headers

Oracle HTTP Server Administration Guide
Release 2 (9.0.2)

Part Number A92173-02
Go To Documentation Library
Home
Go To Product List
Solution Area
Go To Table Of Contents
Contents
Go To Index
Index

Go to previous page Go to next page

6
Oracle HTTP Server Modules

This chapter describes the modules (mods) included in the Oracle HTTP Server. Documentation from the Apache Software Foundation is referenced when applicable.


Note:

Readers using this guide in PDF or hard copy formats will be unable to access third-party documentation, which Oracle provides in HTML format only. To access the third-party documentation referenced in this guide, use the HTML version of this guide and click on the hyperlinks.  


mod_access

This module controls access to the server based on characteristics of a request, such as hostname or IP address.

See Also:

Module mod_access in the Apache Server documentation 

This module is available for UNIX systems only.

mod_actions

This module enables execution of CGI scripts based on file type or request method.

See Also:

Module mod_actions in the Apache Server documentation 

mod_alias

This module enables manipulation of URLs in processing requests. It provides mapping between URLs and filesystem paths, and URL redirection capabilities.

See Also:

Module mod_alias in the Apache Server documentation 

mod_asis

This module enables sending files that contain their own HTTP headers.

This module is not supported by Oracle.

mod_auth

This module enables user authentication with text files.

See Also:

Module mod_auth in the Apache Server documentation 

mod_auth_anon

This module enables anonymous user access to protected areas (similar to anonymous FTP, where the email addresses can be logged).

See Also:

Module mod_auth_anon in the Apache Server documentation 

mod_auth_db

This module uses Berkeley DB files to provide user authentication.

This module is disabled in the Oracle HTTP Server and is not supported by Oracle.

mod_auth_dbm

This module uses DBM files to provide user authentication.

This module is not supported by Oracle.

mod_auth_digest

This module uses MD5 Digest Authentication to provide user authentication.

This module is not supported by Oracle.

mod_autoindex

This module generates directory indexes automatically.

See Also:

Module mod_autoindex in the Apache Server documentation 

mod_cern_meta

This module emulates CERN (Conseil Europeen pour le Recherche Nucleaire) HTTPD metafile semantics. Metafiles are additional HTTP headers that can be produced for each file the server accesses, in addition to the typical set.

This module is not supported by Oracle.

mod_cgi

This module enables the server to run CGI scripts.

See Also:

Module mod_cgi in the Apache Server documentation 

A demonstration of CGI capabilities is available from the Oracle9iAS Welcome page. Click the Demonstrations tab, then the J2EE and Web Cache link.

mod_define

This module enables the Define directive, which defines a variable that can be expanded on any configuration line. The Define directive has the status Extension, which means that it is not compiled into the server by default.

This module requires the Extended API (EAPI).

This module is available for UNIX systems only.

mod_digest

This module uses an older version of the MD5 Digest Authentication specification than that used in mod_auth_digest to provide user authentication. mod_digest probably only works with older browsers.

See Also:

Module mod_digest in the Apache Server documentation 

mod_dir

This module enables the server to perform "trailing slash" redirects. Directories must contain a trailing slash. If a request for a URL without a trailing slash is received, mod_dir redirects the request to the same URL followed by a trailing slash. For example:

http://myserver/documents/mydirectory

is redirected to

http://myserver/documents/mydirectory/

See Also:

Module mod_dir in the Apache Server documentation 

mod_dms

This module enables you to monitor performance of site components with Oracle's Dynamic Monitoring Service.

See Also:

Oracle9i Application Server Performance Guide

mod_env

This module enables you to control the environment for CGI scripts and SSI (Server Side Include) pages by passing, setting, and unsetting environment variables.

See Also:

Module mod_env in the Apache Server documentation 

mod_example

This module provides examples and guidance on how to write modules using the Apache API. When implemented, it demonstrates module callbacks triggered by the server.

This module is not supported by Oracle.

mod_expires

This module enables the server to generate Expires HTTP headers, which provide information to the client about document validity. Documents are served from the source if, based on the expiration criteria, the cached copy has expired.

See Also:

Module mod_expires in the Apache Server documentation 

mod_fastcgi

This third-party module supports the fastcgi protocol, which enables you to maintain a pool of running servers for CGI applications (thereby eliminating start-up and initialization overhead).

A demonstration of FastCGI capabilities is available from the Oracle9iAS Welcome page. Click the Demonstrations tab, then the J2EE and Web Cache link.


Note:

After installation of Oracle9iAS, error messages for FastCGI may appear in the Oracle HTTP Server error log (ORACLE_HOME/Apache/Apache/logs). The messages indicate a server access failure and read by group not allowed. These messages do not affect the operation of FastCGI. They are caused by re-ordering of directives in httpd.conf during installation. To eliminate the messages, move the User and Group directives from the end of the file to a location preceding the FastCGI server directives.  



Warning:

The demonstration script for this module that is shipped with Oracle9iAS should be disabled in production environments. It is included only to verify that the installation was successful.  


See Also:

Module mod_fastcgi in the Apache Server documentation 

mod_headers

This module enables you to merge, replace, or remove HTTP response headers.

See Also:

Module mod_headers in the Apache Server documentation 

mod_imap

This module enables server-side image map processing.

This module is not supported by Oracle.

mod_include

This module provides a filter that processes documents for SSI (Server Side Include) directives.

See Also:

Module mod_include in the Apache Server documentation 

mod_info

This module summarizes the entire server configuration, including all installed modules and directive settings.

See Also:

Module mod_info in the Apache Server documentation 

mod_isapi

This module is available on the Windows platform only. It enables serving of Internet Server extensions (such as.dll modules).

This module is not supported by Oracle.

mod_jserv

This module connects the Oracle HTTP Server to the JServ servlet engine. It converts HTTP requests to servlet requests, returning HTTP responses to the client.

mod_jserv is disabled by default in the Oracle HTTP Server distribution; it is included for legacy support only. The instructions below explain how to enable it with mod_oprocmgr, in manual mode, or in automatic mode. Use the instructions for the mode that serves your needs. A working knowledge of JServ and Oracle HTTP Server directives is assumed.

Enabling JServ with mod_oprocmgr

This section explains how to enable the Oracle default mode for JServ. Use this mode if you want process management and load balancing capabilities for multiple JVMs. The ApJServManual directive has a new mode, 'auto', that enables using JServ with the Oracle module mod_oprocmgr. The file jserv.conf file contains LoadModule directives for mod_jserv and mod_oprocmgr.

Follow these steps to enable JServ with mod_oprocmgr:

  1. Uncomment the Include directive for the jserv.conf file in:

    ORACLE_HOME/Apache/Apache/conf/httpd.conf (UNIX)

    #include "/ORACLE_HOME/Apache/Jserv/etc/jserv.conf"
    

    ORACLE_HOME\Apache\Apache\conf\httpd.conf (Windows)

    #include "C:\ORACLE_HOME\Apache\Jserv\conf\jserv.conf"
  2. Configure directives, if needed, in the file:

    ORACLE_HOME/Apache/Jserv/etc/jserv.conf (UNIX)

    ORACLE_HOME\Apache\Jserv\conf\jserv.conf (Windows)

  3. Configure directives, if needed, in the file:

    ORACLE_HOME/Apache/Jserv/etc/jserv.properties (UNIX)

    ORACLE_HOME\Apache\Jserv\conf\jserv.properties (Windows)

  4. Configure directives, if needed, in the file:

    ORACLE_HOME/Apache/Jserv/etc/zone.properties (UNIX)

    ORACLE_HOME\Apache\Jserv\conf\zone.properties (Windows)

  5. Configure JServ using the Enterprise Manger Web site:

    1. Navigate to the Instance Home Page on the Enterprise Manager Web site. Scroll to the Administration section.

    2. Select Configure Components. This opens the Configure Components Page.

    3. Choose JServ in the Component drop-down menu, enter the ias_admin password, and click OK.

  6. Restart the Oracle HTTP Server.

Enabling JServ in Automatic Mode

This section explains how to enable JServ in automatic mode. Use this mode if you need only one JVM. In this mode, the ApJServManual directive is set to 'off' and the mod_jserv module launches and monitors the JVM. If the Oracle HTTP Server is restarted or stopped, mod_jserv restarts or stops the JVM.

Follow these steps to enable JServ in automatic mode:

  1. Uncomment the Include directive for the jserv.conf file in:

    ORACLE_HOME/Apache/Apache/conf/httpd.conf (UNIX)

    #include "/ ORACLE_HOME/Apache/Jserv/etc/jserv.conf" 
    

    ORACLE_HOME\Apache\Apache\conf\httpd.conf (Windows)

    #include "C:\ORACLE_HOME\Apache\Jserv\conf\jserv.conf" 
    
  2. Configure the ApJServManual directive in the file:

    ORACLE_HOME/Apache/Jserv/etc/jserv.conf (UNIX)

    ORACLE_HOME\Apache\Jserv\conf\jserv.conf (Windows)

    ApJServManual off 
    
  3. Configure other directives as needed in jserv.conf.

  4. Set the port directive in the file:

    ORACLE_HOME/Apache/Jserv/etc/jserv.properties (UNIX)

    ORACLE_HOME\Apache\Jserv\conf\jserv.properties (Windows)

    to the same value as that specified in the ApJServDefaultPort directive.

  5. Configure directives, if needed, in the file:

    ORACLE_HOME/Apache/Jserv/etc/zone.properties (UNIX)

    ORACLE_HOME\Apache\Jserv\conf\zone.properties (Windows)

  6. Configure JServ using the Enterprise Manger Web site:

    1. Navigate to the Instance Home Page on the Enterprise Manager Web site. Scroll to the Administration section.

    2. Select Configure Components. This opens the Configure Components Page.

    3. Choose JServ in the Component drop-down menu, enter the ias_admin password, and click OK.

  7. Restart the Oracle HTTP Server.

Enabling JServ in Manual Mode

This section explains how to enable JServ in manual mode. Use this mode if you need to run multiple JVMs. In this mode, the ApJServManual directive is set to 'on' and you have to stop and start the JVM manually. To monitor the JVM, you must use an external monitoring facility.

Follow these steps to enable JServ in manual mode:

  1. Uncomment the Include directive for the jserv.conf file in the file:

    ORACLE_HOME/Apache/Apache/conf/httpd.conf (UNIX)

    #include "/ ORACLE_HOME/Apache/Jserv/etc/jserv.conf" 
    

    ORACLE_HOME\Apache\Apache\conf\httpd.conf (Windows)

    #include "C:\ORACLE_HOME\Apache\Jserv\conf\jserv.conf" 
    
  2. Configure the ApJServManual directive in the file:

    ORACLE_HOME/Apache/Jserv/etc/jserv.conf (UNIX)

    ORACLE_HOME\Apache\Jserv\conf\jserv.conf (Windows)

    ApJServManual on 
    
  3. Configure other directives as needed in jserv.conf.

  4. Configure directives in the file:

    ORACLE_HOME/Apache/Jserv/etc/jserv.properties (UNIX)

    ORACLE_HOME\Apache\Jserv\conf\jserv.properties (Windows)

  5. Configure directives in the file:

    ORACLE_HOME/Apache/Jserv/etc/zone.properties (UNIX)

    ORACLE_HOME\Apache\Jserv\conf\zone.properties (Windows)

  6. Before or while starting the JVM, set the arguments passed to the Java interpreter, and the classpath passed to the JVM (as specified by wrapper.bin.parameters and wrapper.classpath in the jserv.properties file).


    Note:

    Scripts are provided in the ORACLE_HOME/Apache/Apache/bin directory to start and stop JServ. These include commands to set the arguments and the classpath.  


  7. Configure JServ using the Enterprise Manger Web site:

    1. Navigate to the Instance Home Page on the Enterprise Manager Web site. Scroll to the Administration section.

    2. Select Configure Components. This opens the Configure Components Page.

    3. Choose JServ in the Component drop-down menu, enter the ias_admin password, and click OK.

  8. Restart the Oracle HTTP Server.

Using JServ and OC4J Together

This section explains how to use mod_rewrite to enable some applications to execute on JServ, and others on OC4J.

Perform the following configuration steps to enable JServ and Oracle9iAS Containers for J2EE (OC4J) to coexist. This is important if you have the Portal and Wireless installation type, because of the Portal dependency on OC4J.

  1. Specify the engine on which applications should execute. Suppose you have these URLs:

    /application1/file1.jsp to execute on JServ, and

    /application2/file2.jsp to execute on OC4J.

    You must rewrite the URL for application1.

    1. Edit:

      ORACLE_HOME/Apache/Apache/conf/httpd.conf (UNIX)

      ORACLE_HOME\Apache\Apache\conf\httpd.conf (Windows)

      and ensure that the following directives are present and active (uncommented):

      LoadModule rewrite_module libexec/mod_rewrite.so 
      AddModule mod_rewrite.c 
      RewriteEngine on 
      
    2. Edit:

      ORACLE_HOME/Apache/jsp/conf/ojsp.conf (UNIX)

      ORACLE_HOME\Apache\jsp\conf\ojsp.conf (Windows)

      to add these directives:

      RewriteRule /application1/(.*)/(.*)·jsp$ /application1/$1/$2.jsp1 
      ApJServAction .jsp1 /servlets/oracle.jsp.JspServlet 
      
    3. Remove this directive:

      ApJServAction .jsp /servlets/oracle.jsp.JspServlet 
      
    4. Edit:

      ORACLE_HOME/Apache/Jserv/etc/jserv.conf (UNIX)

      ORACLE_HOME\Apache\Jserv\conf\jserv.conf (Windows)

      and mount /servlets to the JVM that will service the JSP requests. Use the ApJServMount or ApJServGroupMount directive (depending on how the JServ processes are started).

  2. Configure JServ using the Enterprise Manger Web site:

    1. Navigate to the Instance Home Page on the Enterprise Manager Web site. Scroll to the Administration section.

    2. Select Configure Components. This opens the Configure Components Page.

    3. Choose JServ in the Component menu, enter the ias_admin password, and click OK.

  3. Restart the Oracle HTTP Server.

    See Also:

    JServ in the Apache Server documentation 

Configuring Multiple JSP Applications on Different JVMs with mod_jserv

mod_jserv's mapping for JSP applications does not provide for specifying application paths, such as:

ApJServAction /path/.jsp ...

However, you can configure different JSP applications to run on different JVMs under mod_jserv. The configuration steps below show how to use mod_rewrite to change the extension of ' JSP pages associated with a JSP application at request time (where *.jsp1 files belong to application1, and *.jsp2 files belong to application2). Each .jsp extension has its own ApJServAction handler, so that multiple JVMs can be used to run different JSP applications.

Follow the instructions below, substituting application names, directories, page extensions, and hostnames as applicable to your system:

  1. Enable mod_rewrite by adding the following lines to httpd.conf:

    LoadModule rewrite_module libexec/mod_rewrite.so 
    AddModule mod_rewrite.c 
    RewriteEngine on 
    
  2. Set up the applications as follows in ojsp.conf:

    RewriteRule /app1/(.*)/(.*)·jsp$ /app1/$1/$2.jsp1 
    RewriteRule /app2/(.*)/(.*)·jsp$ /app2/$1/$2.jsp2 
    
    ApJServAction .jsp1 /servlets1/oracle.jsp.JspServlet 
    ApJServAction .jsp2 /servlets2/oracle.jsp.JspServlet 
    
  3. Mount /servlets1 and /servlets2 to different JVMs in jserv.conf:

    ApJServMount /servlets1
    ajpv12://hostname:8008/root 
    ApJServMount /servlets2
    ajpv12://hostname:8009/root 
    

mod_log_agent

This module enables logging of client user agents. It is deprecated; you should use mod_log_config instead of mod_log_agent.

This module is not supported by Oracle.

mod_log_config

This module provides configurable, customizable logging of server activities. You can choose the log format, and select or exclude individual requests for logging, based on characteristics of the requests.

See Also:

Module mod_log_config in the Apache Server documentation 

mod_log_referer

This module enables logging of documents that reference documents on the server. It is deprecated; you should use mod_log_config instead of mod_log_referer.

See Also:

Module mod_log_referer in the Apache Server documentation 

mod_mime

This module enables the server to determine the type of a file from its filename, and associate files with handlers for processing.

See Also:

Module mod_mime in the Apache Server documentation 

mod_mime_magic

This module enables the server to determine the MIME type of a file by examining a few bytes of its content. It is used in cases when mod_mime cannot determine a file type. Make sure that mod_mime appears before mod_mime_magic in the configuration file, so that mod_mime processes the files first.

See Also:

Module mod_mime_magic in the Apache Server documentation 

mod_mmap_static

This module maps a list of files into memory, useful for frequently requested files that are not changed often.

This module is not supported by Oracle.

mod_negotiation

This module enables the server for content negotiation (selection of documents based on the client's capabilities).

See Also:

Module mod_negotiation in the Apache Server documentation 

mod_oc4j

This Oracle module routes requests from the Oracle HTTP Server to Oracle9iAS Containers for J2EE (OC4J), providing the ajp13 protocol for communication with the servlet engine.

See Also:

Oracle9iAS Containers for J2EE User's Guide

mod_oc4j is enabled by default. During installation, the oc4j_deploy_tool.jar adds mount points to mod_oc4j.conf for applications deployed into OC4J instances. Requests that come in for specific mount points in mod_oc4j are routed to the OC4J instance for that mount point.

OC4J instances are started and managed by Oracle Process Management and Notification (OPMN). OPMN is briefly described in Chapter 1, "Overview" in the section "Starting, Stopping, and Restarting the Oracle HTTP Server". See the Oracle9i Application Server Administrator's Guide for detailed information on OPMN.

Security Considerations for mod_oc4j

Be aware of the following security considerations when using mod_oc4j:

Configuring mod_oc4j

All relevant directives in httpd.conf and mod_oc4j.conf are described below. Sample configurations are also provided.

mod_oc4j Configuration File

The mod_oc4j directives are maintained in their own file, mod_oc4j.conf. The mod_oc4j.conf file is included by default into the httpd.conf file, using the directive below:

include "ORACLE_HOME/Apache/Apache/conf/mod_oc4j.conf"

where ORACLE_HOME is the path to the Oracle home in which the HTTP Server resides.

mod_oc4j Directives

The directives you use to configure mod_oc4j are described below.

LoadModule

This directive loads the mod_oc4j module. It is included in the default configuration file, so you

Syntax: 

LoadModule oc4j_module mod_oc4j shared library file 

Required: 

Yes 

Default:  

None (UNIX)

LoadModule oc4j_module modules/ApacheModuleOc4j.dll (Windows) 

Example: 

LoadModule oc4j_module mod_oc4j.so (UNIX)

LoadModule oc4j_module modules/ApacheModuleOc4j.dll (Windows) 

Oc4jMount

This directive tells mod_oc4j to route requests containing a particular path to a destination. A destination can be a single OC4J process or a set of OC4J instances.

Syntax: 

Oc4jMount path [destination]

where path is the context root. The path parameter must be the same as the application context root specified in the OC4J configuration file xxx-web-site.xml. The application context root is shown in bold text in the example <web-site> element below.

<default-web-app application="default" name="defaultWebApp" root="/j2ee"/>

and where destination is one of these types:

ajp13_dest

cluster_dest (this is the default destination type)

instance_dest

If destination is not specified, the default OC4J instance name of home will be used. For example,

Oc4jMount /myApp/*

provides the same result as:

Oc4jMount /myApp/* cluster://local_ias_cluster_name:home 

Required: 

No 

Default: 

None  

Examples: 

Oc4jMount /app01/* ajp13://my-sun:8888

Oc4jMount /app02/*

Oc4jMount /app03/* home

Oc4jMount /app04/* ias_cluster_1:home

Oc4jMount /app05/* cluster://ias_cluster_1:home,ias_cluster_2:home

Oc4jMount /app06/* instance://ias_instance_1:home

Oc4jMount /app07/* instance://ias_instance_1:home_1,ias_instance_2:home_2

Oc4jMount /app08/* instance://my-sun:ias_instance_1:home 

Usage:  

Examples are provided for each routing destination:

ajp_13 dest

Oc4jMount path ajp13://my-sun:8888

A request with the pattern specified in path is routed to an OC4J process listening on my-sun, port 8888 with the ajp13 protocol. (my-sun and port 8888 are the ajp13 protocol host and port specified in the OC4J configuration file xxx-web-site.xml.

cluster_dest

Oc4jMount path cluster://iAS Cluster Name:OC4J Instance Name, iAS Cluster Name:OC4J Instance Name...

A request with the pattern specified in path is load balanced to one or more of the OC4J instances specified (instances are separated by commas).

The iAS Cluster Name is optional. If it is provided, the destination OC4J instance should be inside the named cluster. If none is provided, the destination OC4J instance should be inside the local iAS cluster.

instance_dest

Oc4jMount path instance://host:iAS Instance Name:OC4J Instance Name, host:iAS Instance Name:OC4J Instance Name...

A request with the pattern specified in path is load balanced to one or more of the OC4J instances specified (instances are separated by commas).

The host name is optional. If it is provided, the destination OC4J instance should be inside the iAS instance residing on that host. If none is provided, the destination OC4J instance could be on any host.  

Oc4jMountCopy

This directive copies mount points from the base server.

Syntax: 

Oc4jMountCopy on | off  

Required: 

No 

Default:  

on  

Example: 

Oc4jMountCopy off  

Usage:  

This directive tells mod_oc4j whether to copy Oc4jMount points from the base server to the virtual host on which this directive is specified. If its value is On, all of the Oc4jMount points configured in the base server will be copied to the virtual host. If its value is Off, only the Oc4jMount points configured within the virtual host scope will be used.  

Oc4jCacheSize

This directive specifies the size of the OC4J connection cache.

Syntax: 

Oc4jCacheSize size of connection cache  

Required: 

No 

Default:  

UNIX: 1

Windows: 32 

Example: 

Oc4jCacheSize 64 

Usage:  

This directive specifies the number of concurrent OC4J connections that can be cached by one httpd process.

If there are more than 1024 Oracle HTTP Server processes running on the same computer and accessing OC4J instances, you should set this directive to 0. This disables persistent connections between mod_oc4j and the OC4J instances, thereby improving performance.  

Oc4jExtractSSL

This directive governs passing SSL environment variables.

Syntax: 

Oc4jExtractSSL On|Off 

Required: 

No 

Default:  

Off 

Example: 

Oc4jExtractSSL On 

Usage:  

This directive tells mod_oc4j whether or not to pass three SSL environment variables, SSL_CLIENT_CERT, SSL_CIPHER, and SSL_SESSION_ID to OC4J. There is a performance cost associated with copying the SSL environment variables to OC4J, so set it to On only if the environment variables must be available to OC4J.  

Oc4jEnvVar

This directive tells mod_oc4j to pass some environment variables from the Oracle HTTP Server to OC4J.

Syntax: 

Oc4jEnvVar environment variable name [environment variable default value

Required: 

No 

Default:  

None 

Example: 

Oc4jEnvVar MY_ENV1

Oc4jEnvVar MY_ENV2 myenv_value  

Usage: 

For each OC4jEnvVar entry, you must also configure the Oracle HTTP Server directive, PassEnv, with the environment variable. Otherwise, mod_oc4j cannot acquire and pass the value.

Multiple entries are allowed. You could specify the default value for the environment variable as the second parameter, or leave it empty. If the environment variable's value is found in the Oracle HTTP Server environment, its value will be passed to OC4J. Otherwise, if the default value is set, the default value will be passed.

If this environment variable's value is not found in the Oracle HTTP Server environment and the default value is not set, nothing is passed to OC4J.

There is a performance degradation associated with mod_oc4j passing some configured environment variables over to OC4J with each request.  

Sample Configurations for mod_oc4j

This section provides some sample configurations for mod_oc4j.

Level 1 Configuration

Level 1 is the simplest configuration. Two examples of Level 1 configurations are given below.

Example A

This configuration mounts all requests starting with the URI /servlet/ to the default instance of OC4J processes. Because a instance of OC4J processes is handled by OPMN and the default instance must be the same as OPMN's default OC4J instance, this configuration requires that mod_oc4j must be used with OPMN.

  1. Make this entry in the httpd.conf file:

    Oc4jMount /servlet/* 
    
Example B

This configuration performs the same work as the configuration in Example A, using a Location container instead of the Oc4jMount directive.

  1. Make this entry in the httpd.conf file:

    
    <Location /servlet> 
        SetHandler oc4j-handler 
    </Location> 
Example C

This configuration mounts all requests starting with the URI /servlet/ or /j2ee/ and all JSP pages to the default OC4J instance of OC4J processes. This configuration requires that mod_oc4j must be used with OPMN.

  1. Make these entries in the oc4j.conf file:

    Oc4JMount /servlet/*
    Oc4JMount /*.jsp
    Oc4JMount /j2ee/*
    
Example D

This configuration mounts:

  1. Make these entries in the oc4j.conf file:

    Oc4JMount /applicationA/* oc4j_instance_A
    Oc4JMount /applicationB/* oc4j_instance_B
    Oc4JMount /j2ee/*
    Oc4JMount /*.jsp oc4j_instance_A
    

mod_oprocmgr

This Oracle module provides process management and load balancing services to JServ processes. It is provided for legacy users of JServ. JServ is disabled by default in the Oracle HTTP Server configuration. Oracle Corporation recommends using OC4J and mod_oc4j (which are enabled by default).

Configuring mod_oprocmgr to Provide Process Management and Load Balancing to JServ

This section explains how to configure mod_oprocmgr. Terms used in this section to describe the module and its functions are defined below:

mod_oprocmgr

A module that starts, stops, and detects death of processes (starting new processes to replace them), and provides load balancing services to the processes. mod_oprocmgr gets the topology management information via HTTP requests from JServ, and does its job based on this information.

Group

A set of processes across which request traffic is distributed.

Servlet Engine Process

A JVM instance that runs a servlet engine, such as JServ.

How mod_oprocmgr Works With mod_jserv

mod_oprocmgr provides infrastructure capabilities, such as automatic starting of processes, death detection and restart, and load balancing. These capabilities are enabled by a new mode, auto, for the ApJServManual directive.

Based on the configuration information provided by mod_jserv, mod_oprocmgr starts the specified number of JServ processes, managing them for the life of the servers.

Benefits of Using mod_oprocmgr With mod_jserv

mod_oprocmgr enhances the functionality and administration of JServ in several ways:

Process Management

With `ApJServManual off', only one JServ engine can be started and managed automatically. Additional servlet engines have to be manually started, monitored and stopped.

With `ApJServManual auto', any number of JServ engines can be started automatically. The process manager will continually monitor the health of these processes and kill and restart them, if necessary. You can still start JServ processes manually, if you need to.

Configuration

Configuring multiple JServ processes with `ApJServManual on'/`ApJServManual off' is more complicated and error prone. For example, a 10 process "balance" configuration requires 32 directives and 10 jserv.properties files.

Configuring multiple JServ processes with the new `auto' mode requires much less effort. For example, a 10 process "balance" configuration requires only 3 directives.

Configuring mod_jserv for Process Management

If you are already familiar with the configuration directives for mod_jserv, the configuration process for mod_oprocmgr is straightforward. The configuration files are listed below.

Changes to httpd.conf

To use mod_oprocmgr, ensure that the directives below are included in the file:

ORACLE_HOME/Apache/Apache/conf/httpd.conf (UNIX)

ORACLE_HOME\Apache\Apache\conf\httpd.conf (Windows)

<IfModule mod_oprocmgr.c>
  ProcNode my-sun.us.oracle.com 7777
  <IfDefine SSL>
    ProcNode my-sun.us.oracle.com 80
  </IfDefine>
  <Location /oprocmgr-service>
    SetHandler oprocmgr-service
  </Location>
 </IfModule>

In addition, you must specify at least one non-SSL port. For a secure website (that is, one that only accepts SSL connections), you must provide an extra non- SSL port. To do this, add the directives shown below, substituting port and address values:

Listen <port>
<VirtualHost _default_:port>
   SSLEngine Off
  <Location />
    order deny, allow
    deny from all
    allow from <IP address 1 of local node>
    allow from <IP address 2 of local node>
    allow from <IP address 3 of local node>
  </Location>
</VirtualHost>

In the LoadModule section, ensure that mod_oprocmgr is loaded after mod_osso. The call back function of mod_oprocmgr in the 'check usrid' stage must be invoked before that of mod_osso.

Changes to jserv.properties

In the file:

ORACLE_HOME/Apache/Jserv/etc/jserv.properties (UNIX)

ORACLE_HOME\Apache\Jserv\etc\jserv.properties (Windows)

you specify the ports to which JServ will bind, as shown in the example below.

port=8007

If no ports are specified, the JServ processes will choose their ports. If you want the JServ processes to choose their ports, enter the port directive as shown below. If you eliminate the directive entirely, an error will occur.

port=

You can specify multiple ports, and separate the values with commas as shown in the example below. Note that a range of ports (9000-9010) is a valid value.

port=8007,9000-9010,8010

Changes to jserv.conf

To use mod_oprocmgr with mod_jserv, you must change the directives as indicated below in the JServ configuration file:

ORACLE_HOME/Apache/Jserv/etc/jserv.conf (UNIX)

ORACLE_HOME\Apache\Jserv\conf\jserv.conf (Windows)

ApJServManual

This directive accepts a new mode, auto, which invokes the new infrastructure functionality (in which mod_oprocmgr manages processes). The syntax is:

ApJServManual auto 

You can set the mode to on or off to use the standard JServ functionality.

ApJServGroup

This directive defines groups for the process manager to manage for mod_jserv. If you have worked with mod_jserv, you will note that this directive replaces the ApJServBalance, ApJServHost, ApJServRoute and ApJServShmFile directives.

All JServ processes to be managed must belong to a group, and each group has its own ApJServGroup directive. If you only have one JServ process, you must define a group with just that process in it. The processes in a group are identical except for their listening ports, so requests directed to the group are distributed evenly among the processes.

The ApJServGroup directive takes four arguments: groupname, number of processes, node weight, and properties file. In the example below, the groupname is mygroup, the number of processes is 1, the node weight is 1, and the full path of the properties file used to start the JServ processes is

ORACLE_HOME/Apache/JServ/etc/jserv.properties

ApJServGroup mygroup 1 1 /private2/up_1022/Apache/Jserv/etc/jserv.properties
ApJServGroupMount

This directive defines a mount point and maps it to a process group and zone. In the example below, the mount point is /servlets, the group is mygroup, and the zone is root. Note that the balance protocol is in use for routing, as in the standard JServ configuration.

ApJServGroupMount /servlets balance://mygroup/root 

Place this directive after the ApJServGroup directive in the configuration file.

ApJServGroupSecretKey

This directive specifies the secret key that JServ needs to authenticate clients. It can be disabled, as shown below:

ApJServGroupSecretKey disabled

When activated, the directive takes one or two arguments. In the example below, with group and filename arguments, the filename mysecretkey applies to the group mygroup.

ApJServGroupSecretKey mygroup /usr/local/apache/jserv/mysecretkey

You can supply only the filename argument, as shown below. No group is named, so the secret key filename applies to all groups.

ApJServGroupSecretKey /usr/local/apache/jserv/mysecretkey

You cannot combine directives using the one-argument syntax with directives using the two-argument syntax. If you use the two-argument syntax, the default for groups without a group-specific secret key is 'disabled'.

Place this directive after the ApJServGroup directive in the configuration file.


Warning:

The secret in the secret key file specified in ApJServSecretKey must be the same as that specified by the security.secretKey directive in the jserv.properties file. If the secrets are not the same, the death detection mechanism assumes that all the servlet engine processes are dead, eliminates them, and starts new processes to replace them (repeating the cycle endlessly).  


mod_oradav

mod_oradav is the Oracle module (an OCI application written in C) that is an extended implementation of mod_dav, and is integrated with the Oracle HTTP Server. mod_oradav can read and write to local files or to an Oracle database. The Oracle database must have an OraDAV driver (a stored procedure package) that mod_oradav calls to map WebDAV activity to database activity. Essentially, mod_oradav enables WebDAV clients to connect to an Oracle database, read and write content, and query and lock documents in various schemas.

You can configure mod_oradav to an Oracle database using standard Oracle HTTP Server directives. mod_oradav can immediately leverage other module code (such as mime_magic) in order to perform content management tasks. Most OraDAV processing activity involves streaming content to and from a content provider; and mod_oradav uses OCI streaming logic directly within the Oracle HTTP Server.

To configure mod_oradav, you enter parameters within a Location directive in httpd.conf. The Location directive specifies the DAV-enabled URL. The DAV keyword is followed by a single value: On, which tells mod_dav is to use the local file system for content.

The following example specifies that the directory myfiles under the Web server documents directory (htdocs by default) is to be DAV-enabled, along with all directories under myfiles in the hierarchy. (Note that there must not be any symlinks defined on myfiles or any of its subdirectories.)

<Location /myfiles>
   DAV On
</Location>

See Also:

Chapter 7, "Configuring and Using mod_oradav" 

See Also:

Oracle9iAS Portal Configuration Guide 

For information about using mod_oradav to access database schemas for access by third-party tools (such as Adobe GoLive and Macromedia Dreamweaver) and Oracle interMedia, see the OraDAV information available on the Oracle Technology Network at

http://otn.oracle.com.

mod_ossl

This Oracle module enables strong cryptography for the HTTP Server.

See Also:

Oracle9i Application Server Security Guide

mod_osso

This Oracle module enables single-sign on for the Oracle HTTP Server. mod_osso examines incoming requests and determines whether the resource requested is protected, and if so, retrieves the HTTP Server cookie for the user.

See Also:

Oracle9i Application Server Security Guide

Exposing the Basic Authentication URL to mod_osso

To operate an SSO server in SSL mode, you must specify one or both of these parameters in the mod_osso.conf file:

nonssl_sso_port=port
nonssl_sso_host=alternative sso server name

The port parameter is needed to facilitate internal communication between an Oracle HTTP Server and an SSL-enabled SSO server. At installation time, the SSORegistrar tool sets the nonssl_sso_port parameter as follows:

nonssl_sso_port=5000

Add the following to the httpd.conf file to expose the Basic Authentication URL to mod_osso:

#Use the following configuration to protect SSO Server URLs:

# SSO Server Login URL
<IfDefine SSL>
  <Location /pls/orasso/orasso.wwsso_app_admin.ls_login>
    SSLRequireSSL
  </Location>
</IfDefine>

# Change password URL
<IfDefine SSL>
  <Location /pls/orasso/orasso.wwsso_app_user.mgr.change_password>
    SSLRequireSSL
  </Location>
</IfDefine>

# External Application Login URL
<IfDefine SSL>
  <Location /pls/orasso/orasso.wwsso_app_user.mgr.change_password>
    SSLRequireSSL
  </Location>

mod_perl

This module embeds the Perl interpreter into the Oracle HTTP Server. This eliminates start-up overhead and enables you to write modules in Perl.

A demonstration of Perl capabilities is available from the Oracle9iAS Welcome page. Click the Demonstrations tab, then the J2EE and Web Cache link.


Warning:

The demonstration script for this module that is shipped with Oracle9iAS should be disabled in production environments. It is included only to verify that the installation was successful.  


See Also:

mod_perl Guide  

Database Usage Notes

This section provides information for mod_perl users working with databases. It explains how to test a local database connection and set character forms.

Testing the Database Connection

Below is a sample Perl script for testing the database connection of a local seed database. To use the script to test another database connection, you must replace scott/tiger with the user name and password for the target database.

##### Perl script start ###### 
use DBI;
print "Content-type: text/plain\n\n"; 
$dbh = DBI->connect("dbi:Oracle:", "scott/tiger", "") || die $DBI::errstr; 
$stmt = $dbh->prepare("select * from emp order by empno")|| die $DBI::errstr; $rc = $stmt->execute() || die $DBI::errstr; while (($empno, $name) = $stmt->fetchrow()) { print "$empno $name\n"; } warn $DBI::errstr if $DBI::err; die "fetch error: " . $DBI::errstr if $DBI::err; $stmt->finish() || die "can't close cursor"; $dbh->disconnect() || die "cant't log off Oracle"; ##### Perl script End ######

Using SQL NCHAR Datatypes

SQL NCHAR datatypes have been refined in Oracle9i, and are now called reliable Unicode datatypes. SQL NCHAR datatypes such as NCHAR, NVARCHAR2 and NCLOB allow you to store any Unicode characters regardless of the database character set. The character set for those datatypes is specified by the national character set, which is either AL16UTF-16 or UTF8. See the Oracle9i documentation for more about SQL NCHAR datatypes.

This release of DBD::Oracle supports SQL NCHAR datatypes and provides driver extension functions to specify the character form for data binding. The following script shows an example to access SQL NCHAR data:

# declare to use the constants for character forms
use DBD::Oracle qw(:ora_forms);
# connect to the database and get the database handle
$dbh = DBI->connect( ... );
# prepare the statement and get the statement handle
$sth = $dbh->prepare( 'SELECT * FROM TABLE_N WHERE NCOL1 = :nchar1' );
# bind the parameter of a NCHAR type
$sth->bind_param( ':nchar1', $param_1 );
# set the character form to NCHAR
$sth->func( { ':nchar1' => ORA_NCHAR } , 'set_form' );
$sth->execute;

As shown above, the set_form function is provided as a private function that you can invoke with the standard DBI func() method. It takes an anonymous hash that specifies which placeholder should be associated with which character form. The valid values of character form are either ORA_IMPLICIT or ORA_NCHAR. Setting the character form to ORA_IMPLICIT causes the application's bound data to be converted to the database character set, and ORA_NCHAR to the national character set. The default form is ORA_IMPLICIT.

Another function is provided to specify the default character set form as follows:

# specify the default form to be NCHAR
$dbh->func( ORA_NCHAR, 'set_default_form' );

After this call is made, the form of all parameters is ORA_NCHAR, unless otherwise specified with set_form calls. Note that unlike the set_form function, this is a function on the database handle, so every statement from the database handle with its default form specified will have the form of your choice by default.

set_form

This function sets the character form for parameter(s). Valid forms are either ORA_IMPLICIT(default) or ORA_NCHAR. The constants are available as: ora_forms in DBD::Oracle.

Examples:

# a declaration example for the constants ORA_IMPLICIT and ORA_NCHAR
use DBD::Oracle qw(:ora_forms);

# set the character form for the placeholder :nchar1 to NCHAR

$sth->func( { ':nchar1' => ORA_NCHAR } , 'set_form' );

# set the character form using the positional index
$sth->func( { 2 => ORA_NCHAR } , 'set_form' );
# set the character form for multiple placeholders at once
$sth->func( { 1 => ORA_NCHAR, 2 => ORA_NCHAR } , 'set_form' );
set_default_form

This function sets the default character form for a database handle.

Example:

$dbh->func( ORA_NCHAR , 'set_default_form' );

mod_plsql

This Oracle module connects the Oracle HTTP Server to mod_plsql, enabling you to create Web applications using Oracle stored procedures. This section contains the following topics:

mod_plsql Configuration Files

DAD Parameters

Sample DADs

Configuring mod_plsql For Use With WebDB 2.x

mod_plsql Configuration Files

The mod_plsql configuration files are related in a "configuration tree", which is implemented as shown below.

The primary Oracle HTTP Server configuration file

ORACLE_HOME/Apache/Apache/conf/httpd.conf 

contains an include directive for:

ORACLE_HOME/Apache/Apache/conf/oracle_apache.conf 

oracle_apache.conf contains an include directive for:

ORACLE_HOME/Apache/modplsql/conf/plsql.conf

plsql.conf contains an include directive for:

ORACLE_HOME/Apache/modplsql/conf/dads.conf
ORACLE_HOME/Apache/modplsql/conf/cache.conf

plsql.conf

This file contains the LoadModule directive to load mod_plsql into the Oracle HTTP Server, global settings for mod_plsql, and include directives for dads.conf and cache.conf. An example is shown below.

###############################################################################
#                        mod_plsql Configuration File                         #
###############################################################################
#
#In a default install, this file gets included as per the following tree
#   httpd.conf (under $ORACLE_HOME/Apache/Apache/conf)
#     |
#     |--> oracle_apache.conf (under $ORACLE_HOME/Apache/Apache/conf)
#            |
#            |
#            |--> plsql.conf (under $ORACLE_HOME/Apache/modplsql/conf)
#                   |
#                   |-----> dads.conf (under $ORACLE_HOME/Apache/modplsql/conf)
#                   |-----> cache.conf (under $ORACLE_HOME/Apache/modplsql/conf)
#
# Tell Apache to load the Modplsql module
LoadModule plsql_module %ORACLE_HOME%/Apache/modplsql/bin/modplsql.%SO_EXT%

# Load in the setting only if plsql_module is loaded
<IfModule mod_plsql.c>

# Global Settings Section
# This section contains modplsql directives that applies to all DADs.

# Log mode of modplsql.
# To view more details about the internal processing of modplsql, please set
# this directive to 'On'. This will cause modplsql to start logging for every
# request that is processed. The log files will be generated specified by
# the PlsqlLogDirectory directive (defined below).
#
# Logging is meant to be used for debugging purposes only. When logging is
# enabled, there will be a lot of log files generated under
# $ORACLE_HOME/Apache/modplsql/logs (or as configured by the directive
# PlsqlLogDirectory). This parameter should be set to 'Off' unless recommended
# by Oracle support to debug problems with mod_plsql. 
#
# Syntax: PlsqlLogEnable [Off/On]
# Default: Off
PlsqlLogEnable Off

# Log directory of modplsql.
# Set the directory name of the place where log files should be generated when 
# logging is enabled. To avoid possible confusion about the location of this
# directory, an absolute path is recommended
#
# On Unix, this directory must have write permissions by the owner of the
# child httpd processes. In other words, if Apache is running as user nobody,
# then this directory must have its permissions set so that user nobody can
# write to it. 
#
# Syntax: PlsqlLogDirectory [directory]
# Default: [none]
PlsqlLogDirectory %ORACLE_HOME%/Apache/modplsql/logs

# DMS logging of modplsql.
# This turns on/off the DMS logging for modplsql. Usually, this is turned on
# in order to monitor modplsql.
#
# If you do not plan to monitor the performance of your site using the OEM
# Tool, then turning this parameter off will give you a small benefit in
# performance.
#
# Syntax: PlsqlDMSEnable [On/Off]
# Default: On 
# PlsqlDMSEnable On


# Cache Settings Section
# Load in the cache settings by including it here
include %ORACLE_HOME%/Apache/modplsql/conf/cache.conf

# Data Access Descriptors Settings Section
# Load in the DADs settings by including it here
include %ORACLE_HOME%/Apache/modplsql/conf/dads.conf

</IfModule>

dads.conf

This file contains the configuration parameters for the PL/SQL Database Access Descriptor (DAD).

A DAD is a set of values that specify how mod_plsql connects to a database server to fulfill an HTTP request. Besides the connection details, a DAD contains important configuration parameters for various operations in the database and for mod_plsql in general. Any web-enabled PL/SQL application which makes use of the OWA Web ToolKit must create a DAD to invoke the application.

Some typical PL/SQL applications that require DADs are:

DAD Format

A DAD has the format shown below. It uses the Oracle HTTP Server <Location> container directive to mount virtual paths to a particular DAD.

<Location /pls/orasso>
  SetHandler pls_handler
  Order deny,allow
  ...
</Location>

The <Location> container specifies the virtual path (the DAD path, which in the example above is /pls/orasso) for the Oracle HTTP Server. The directives in the container specify how requests routed to that location are to be processed. This is a mandatory parameter for a DAD.

For most PL/SQL applications, the DAD path can be any string.

For example:

/myapp
/plsqlapp
/cartx/owa

For Oracle Portal, all DADs must be prefixed with '/pls'. For example:

/pls/portal
/pls/portal309
/pls/portal306

The SetHandler directive tells the Oracle HTTP Server to forward the request to mod_plsql to handle. This is a mandatory parameter for a DAD.

Below is an example of a typical PLSQL application DAD:

<Location /pls/plsqlapp>
  SetHandler pls_handler
  Order deny,allow
  AllowOverride None
  PlsqlDatabaseUsername         scott 
  PlsqlDatabasePassword         tiger
  PlsqlDatabaseConnectString    host:port:sid
  PlsqlDefaultPage              scott.home
  PlsqlDocumentTablename        scott.wwdoc_document
  PlsqlDocumentPath             docs
  PlsqlDocumentProcedure        scott.wwdoc_process.process_download
  PlsqlAuthenticationMode       Basic
</Location>

DAD Parameters

This section describes all the Database Access Descriptor (DAD) level parameters that can be specified in the dads.conf file. The following directives are Oracle HTTP Server supported directives. You can use any directives typically used in <Location> containers, such as:

Order deny,allow
AllowOverride None

PlsqlDatabaseUserName

Specifies the username to use to log in to the database.

Syntax:

PlsqlDatabaseUsername string

Default: None.

Example:

PlsqlDatabaseUsername scott

Notes:

PlsqlDatabasePassword

Specifies the password to use to log in to the database.

Syntax:

PlsqlDatabasePassword string

Default: None.

Example:

PlsqlDatabasePassword tiger

Notes:

PlsqlDatabaseConnectString

Specifies the connection to a remote database.

Syntax:

PlsqlDatabaseConnectString string

where string can be one of the following:

Default: None.

Example:

PlsqlDatabaseConnectString orcl.us.oracle.com

or

PlsqlDatabaseConnectString myhost.us.oracle.com:1521:ORCL
#

Notes:

PlsqlAuthenticationMode

Specifies the authentication mode to use for allow access through this DAD.

Syntax:

PlsqlAuthenticationMode Basic/SingleSignOn/GlobalOwa/CustomOwa/PerPackageOwa

Default: Basic

Example:

PlsqlAuthenticationMode Basic

Notes:

PlsqlSessionCookieName

Specifies the cookie name for the Oracle Portal session.

Syntax:

PlsqlSessionCookieName string

Default: DAD name

Example:

PlsqlSessionCookieName portal

Notes:

PlsqlSessionStateManagement

Specifies how package and session state should be cleaned up at the end of each mod_plsql request.

Setting this parameter to StatelessWithResetPackageState causes mod_plsql to call dbms_session.reset_package_state at the end of each mod_plsql request.

Setting this parameter to StatelessWithPreservePackageState causes mod_plsql to call htp.init at the end of each mod_plsql request. This cleans up the state of session variables in the OWA Web ToolKit. The PL/SQL application is responsible for cleaning up its own session state. Failure to do so will cause erratic behavior, in which a request will start recognizing or manipulating state modified in previous requests.

Setting this parameter to StatelessWithFastResetPackageState causes mod_plsql to call dbms_session.modify_package_state(dbms_session.reinitialize) at the end of each mod_plsql request. This API is a lot faster than the mode of StatelessWithResetPackageState and avoids some latch contention issues, but exists only in database versions 8.1.7.2 and above. This mode uses up slightly more memory than the default mode. Check the status of bug 2096244 before using this mode.

Syntax:

PlsqlSessionStateManagement 
StatelessWithResetPackageState/StatelessWithFastResetPackageState/StatelessWithP
reservePackageState

Default: StatelessWithResetPackageState

Example:

PlsqlSessionStateManagement StatelessWithResetPackageState

Notes:

PlsqlMaxRequestsPerSession

Specifies the maximum number of requests a pooled database connection should service before it is closed and re-opened.

Syntax:

PlsqlMaxRequestsPerSession number

Default: 1000

Example:

PlsqlMaxRequestsPerSession 1000

Notes:

PlsqlDefaultPage

Specifies the default procedure to call if none is specified in the URL.

Syntax:

PlsqlDefaultPage string

Default: None.

Example:

PlsqlDefaultPage myschema.mypackage.home

Notes:

PlsqlDocumentTablename

Specifies the table in the database to which all documents will be uploaded.

Syntax:

PlsqlDocumentTablename string

Default: None.

Example:

PlsqlDocumentTablename myschema.document_table

For Portal:

PlsqlDocumentTablename portal.wwdoc_document 

For WebDB:

PlsqlDocumentTablename webdb.wwv_document 

Notes:

PlsqlDocumentPath

Specifies the access path to download a document. This is a virtual path that initiates document download from the document table. For example, if this parameter is set to docs, then the following URLs will start the document downloading process for URLs of the format:

/pls/dad/docs
/pls/plsqlapp/docs

Syntax:

PlsqlDocumentPath string

Default: docs

Example:

PlsqlDocumentPath docs

Notes:

PlsqlDocumentProcedure

Specifies the procedure to call when a document download is initiated. This procedure is called to process the download.

Syntax:

PlsqlDocumentProcedure string

Default: None.

Example:

PlsqlDocumentProcedure portal.wwdoc_process.process_download

Notes:

PlsqlUploadAsLongRaw

Specifies the extensions to be uploaded as LONGRAW data type (as opposed to using the default BLOB data type). The default can be overridden by specifying multiline directives of file extensions for field. A value of '*' in this field will cause all documents to be uploaded as LONGRAW.

Syntax:

PlsqlUploadAsLongRaw string multiline

Default: None.

Example:

PlsqlUploadAsLongRaw jpg
PlsqlUploadAsLongRaw gif

For WebDB:

PlsqlUploadAsLongRaw * 

Notes:

PlsqlPathAlias

Specifies a virtual path alias to map to a procedure call. This is application specific; for example, Oracle Portal sets this to url which means that all URLs of type /pls/myapp/url/* are handled as special URLs and directed to a specific procedure as configured by PlsqlPathAliasProcedure.

Syntax:

PlsqlPathAlias string

Default: None.

Example:

PlsqlPathAlias url

Notes:

PlsqlPathAliasProcedure

Specifies the procedure to call when the virtual path in the URL matches the path alias as configured by PlsqlPathAlias.

Syntax:

PlsqlPathAliasProcedure string

Default: None.

Example:

PlsqlPathAliasProcedure portal.wwpth_api_alias.process_download

Notes:

PlsqlExclusionList

Specifies a pattern for excluding certain procedures, packages, or schema names from being directly executed from a browser. This is a multi-line directive in which each pattern occupies one line. The pattern is case-insensitive and can accept simple wildcards such as *, ? and [a-z]. The default patterns excluded from direct URL access are: sys.*, dbms_*, utl_*, owa_*, owa.*, htp.*, htf.*.

Setting this directive to #NONE# will disable all protection. This is not recommended for a live site, however, it is sometimes used for debugging purposes.

If this parameter is overridden, the defaults are no longer in effect. In that case, you must explicitly add the default list to the list of excluded patterns.

Syntax:

PlsqlExclusionList string multiline/#NONE#  

Default:

sys.*
dbms_*
utl_*
owa_*
owa.*
htp.*
htf.*

Example:

PlsqlExclusionList sys.*
PlsqlExclusionList dbms_*
PlsqlExclusionList utl_*
PlsqlExclusionList owa_*
PlsqlExclusionList owa.*
PlsqlExclusionList htp.*
PlsqlExclusionList htf.*
PlsqlExclusionList myschema.private.*

will exclude access to URLs containing: sys.*, dbms_*, utl_*, owa_*, owa.*, htp.*, htf.*, myschema.private.*

However,

PlsqlExclusionList myschema.private.*

will only exclude access to URLs containing myschema.private.*. The system defaults will no longer be protected (this is normally done for backward compatibility only).

Notes:

PlsqlCGIEnvrionmentList

Specifies overrides and or additions of CGI environment variables to the default set of environment variables passed down to a PL/SQL procedure. This is a multi-line directive of name-value pairs to be added, overridden or removed.

You can add CGI environment variables from the Oracle HTTP Server environment by specifying the variable name. To remove a CGI environment variable, set it equal to nothing. To add your own name-value pair, use the syntax myname=myvalue

Syntax:

PlsqlCGIEnvironmentList string multiline

Default: None.

Example:

To add and/or override:

PlsqlCGIEnvironmentList MYENVAR1=myvalue 

To remove:

PlsqlCGIEnvironmentList MYENVAR2= 

To add and/or override from the Oracle HTTP Server environment:

PlsqlCGIEnvironmentList DOCUMENT_ROOT

Notes:

PlsqlCompatibilityMode

Specifies the compatibility mode for running mod_plsql. If you are running mod_plsql against an pre-9.0.2 version of mod_plsql, you must set this value to 1.

Syntax:

PlsqlCompatibilityMode BitFlag

Default: 0

Example:

PlsqlCompatibilityMode 1

Notes:

PlsqlNLSLanguage

Specifies the NLS_LANG variable for this DAD. This parameter overrides the NLS_LANG environment variable. When this parameter is set, the PL/SQL Gateway uses the specified NLS_LANG to connect to the database. Once connected, an alter session command is issued to switch to the specified language and territory.

Syntax: PlsqlNLSLanguage string

Default: None.

Example:

PlsqlNLSLanguage America_American.UTF8

Notes:

PlsqlFetchBufferSize

Specifies the number of rows of content to fetch from the database for each trip (using either owa_util.get_page or owa_util.get_page_raw). For large generated pages, setting this parameter higher can decrease the number of trips to the database to get the content. However, mod_plsql memory usage will increase.

For Japanese, Chinese or multi-byte character set languages, setting this parameter to 256 will yield better performance.

Syntax:

PlsqlFetchBufferSize number

Default: 128

Example:

PlsqlFetchBufferSize 256

Notes:

PlsqlErrorStyle

Specifies the Error Reporting Mode for mod_plsql errors. This parameter accepts the following values:

ApacheStyle: This is the default mode. In this mode, mod_plsql indicates to Oracle HTTP Server the HTTP error that was encountered. The Oracle HTTP Server then generates the error page. This can be used with the Oracle HTTP Server ErrorDocument directive to produce customized error messages.

ModplsqlStyle: mod_plsql generates the error pages, usually a short message indicating the PL/SQL error that was encountered and PL/SQL exception stack, if any. For example:

scott.foo PROCEDURE NOT FOUND

DebugStyle: This mode provides more details than ModplsqlStyle. mod_plsql provides more details about the URL, parameters and also produces server configuration information. This mode is for debugging purposes only. Do not use this in a production system, since displaying internal server variables could be a security risk.

Syntax: PlsqlErrorStyle ApacheStyle/ModplsqlStyle/DebugStyle

Default: ApacheStyle

Example:

PlsqlErrorStyle ModplsqlStyle

Notes:

PlsqlTransferMode

Specifies the transfer mode for data from the database back to mod_plsql. Most applications use the default value of CHAR.

Syntax:

PlsqlTransferMode CHAR/RAW

Default: CHAR

Example:

PlsqlTransferMode CHAR

Notes:

PlsqlBeforeProcedure

Specifies the procedure to be invoked before calling the requested procedure. This enables you to put a hook point before the requested procedure is called. This is useful in doing SQL*Traces/SQL Profiles while debugging a problem with the requested procedure. This is also useful when you want to ensure that a specific call be made before running every procedure. This is an internal parameter and can be removed without notice.

Syntax:

PlsqlBeforeProcedure string

Default: None.

Example:

PlsqlBeforeProcedure portal.mypkg.mybeforeproc

Notes:

PlsqlAfterProcedure

Specifies the procedure to be invoked after calling the requested procedure. This enables you to put a hook point after the requested procedure is called. This is useful in doing SQL*Traces/SQL Profiles while debugging a problem with the requested procedure. This is also useful when you want to ensure that a specific call be made after running every procedure. This is an internal parameter and can be removed without notice.

Syntax:

PlsqlAfterProcedure string

Default: None.

Example:

PlsqlAfterProcedure portal.mypkg.myafterproc

Notes:

PlsqlBindBucketLengths

Specifies the rounding size to use while binding the number of elements in a collection bind. While executing PL/SQL statements, the Oracle database maintains a cache of PL/SQL statements in the shared SQL area, and attempts to reuse the cached statement if the same statement is executed again. Oracle's matching criteria requires that the statement texts be identical, and that the bind variable data types match. Unfortunately, the type match for strings is sensitive to the exact byte size specified, and for collection bindings is also sensitive to the number of elements in the collection. Since mod_plsql binds statements dynamically, the odds of hitting the shared cache are low, and it may fill up with near-duplicates and lead to contention for the latch on the shared area. This parameter reduces that effect by bucketing bind lengths to the nearest level.

All numbers specified should be in ascending order. After the last specified size, subsequent bucket sizes will be assumed to be twice the last one.

Syntax:

PlsqlBindBucketLengths number multiline

Default: 4,20,100,400

Example:

PlsqlBindBucketLengths  4
PlsqlBindBucketLengths  25
PlsqlBindBucketLengths  125

Notes:

PlsqlBindBucketWidths

Specifies the rounding size to use while binding the number of elements in a collection bind. While executing PL/SQL statements, the Oracle database maintains a cache of PL/SQL statements in the shared SQL area, and attempts to reuse the cached statement if the same statement is executed again. Oracle's matching criteria requires that the statement texts be identical, and that the bind variable data types match. Unfortunately, the type match for strings is sensitive to the exact byte size specified, and for collection bindings is also sensitive to the number of elements in the collection. Since mod_plsql binds statements dynamically, the odds of hitting the shared cache are low, and it may fill up with near-duplicates and lead to contention for the latch on the shared area. This parameter reduces that effect by bucketing bind widths to the nearest level.

All numbers specified should be in ascending order. After the last specified size, subsequent bucket sizes will be assumed to be twice the last one.

The last bucket width must be equal to or less than 4000. This is due to the restriction imposed by OCI where array bind widths cannot be greater than 4000.

Syntax:

PlsqlBindBucketWidths number multiline

Default:

32,128,1450,2048,4000

Example:

PlsqlBindBucketWidths  40
PlsqlBindBucketWidths  400
PlsqlBindBucketWidths  2000

Notes:

PlsqlAlwaysDescribeProcedure

Specifies whether mod_plsql should describe a procedure before trying to execute it. If this is set to On, then mod_plsql will always describe a procedure before invoking it. Otherwise, mod_plsql will only describe a procedure when its internal heuristics have interpreted a parameter type incorrectly.

Syntax:

PlsqlAlwaysDescribeProcedure On/Off

Default: Off

Example:

PlsqlAlwaysDescribeProcedure Off

Notes:

PlsqlIdleSessionCleanupInterval

Time after which idle sessions are closed and cleaned up. This directive is used in conjunction with connection pooling of database connections and sessions in mod_plsql. When a session is not used for the specified amount of time, that session will be closed and freed. This is so that unused sessions can be cleaned up and memory be freed on the database side.

Syntax:

PlsqlIdleSessionCleanupInterval number

Default: 15 minutes

Example:

PlsqlIdleSessionCleanupInterval 10

Notes:

Sample DADs

This section contains some examples of DADs used in Oracle9iAS applications.

Portal 9.0.2 DAD

<Location /pls/portal>
  SetHandler pls_handler
  Order deny,allow
  AllowOverride None
  PlsqlDatabaseUsername         portal
  PlsqlDatabasePassword         portal
  PlsqlDatabaseConnectString    host:port:sid
  PlsqlDefaultPage              portal.home
  PlsqlDocumentTablename        portal.wwdoc_document
  PlsqlDocumentPath             docs
  PlsqlDocumentProcedure        portal.wwdoc_process.process_download
  PlsqlAuthenticationMode       SingleSignOn
  PlsqlPathAlias                url
  PlsqlPathAliasProcedure       portal.wwpth_api_alias.process_download
  PlsqlSessionCookieName        portal
</Location>

Login Server instance DAD

<Location /pls/orasso>
  SetHandler pls_handler
  Order deny,allow
  AllowOverride None
  PlsqlDatabaseUsername         orasso
  PlsqlDatabasePassword         orasso
  PlsqlDatabaseConnectString    host:port:sid
  PlsqlDefaultPage              orasso.home
  PlsqlDocumentTablename        orasso.wwdoc_document
  PlsqlDocumentPath             docs
  PlsqlDocumentProcedure        orasso.wwdoc_process.process_download
  PlsqlAuthenticationMode       SingleSignOn
  PlsqlPathAlias                url
  PlsqlPathAliasProcedure       orasso.wwpth_api_alias.process_download
  PlsqlSessionCookieName        orasso
</Location>

Portal 3.0.x DAD

<Location /pls/portal30>
  SetHandler pls_handler
  Order deny,allow
  AllowOverride None
  PlsqlDatabaseUsername         portal30
  PlsqlDatabasePassword         portal30
  PlsqlDatabaseConnectString    host:port:sid
  PlsqlDefaultPage              portal30.home
  PlsqlDocumentTablename        portal30.wwdoc_document
  PlsqlDocumentPath             docs
  PlsqlDocumentProcedure        portal30.wwdoc_process.process_download
  PlsqlAuthenticationMode       SingleSignOn
  PlsqlPathAlias                url
  PlsqlPathAliasProcedure       portal30.wwpth_api_alias.process_download
  PlsqlSessionCookieName        portal30
  PlsqlCompatibilityMode        1
</Location>

WebDB DAD

<Location /pls/webdb>
  SetHandler pls_handler
  Order deny,allow
  AllowOverride None
  PlsqlDatabaseConnectString    host:port:sid
  PlsqlDefaultPage              webdb.home
  PlsqlDocumentTablename        webdb.wwv_document
  PlsqlDocumentPath             docs
  PlsqlUploadAsLongRaw          *
  PlsqlDocumentProcedure        webdb.wwv_document.process_download
</Location>

cache.conf

This file contains the cache settings for mod_plsql. An example is shown below.

###############################################################################
#                   Modplsql Caching Configuration File                       #
###############################################################################

# Note: this file should be appended or included into your plsql.conf

# This file specifies the charateristics of the modplsql caching system. There
# are two types of caching being used : 
# - PLSQL Cache
#   PLSQL Caching is used to cache dynamically generated contents that don't 
# change often. Applications using the OWA_CACHE package, such as Oracle 
# Portal, use this feature to improve performance and take some load off 
# the database.
#
# - Session Cookie Cache
#   Session Cookie Caching is used to cache the cookie value generated by a 
# Single Sign On server for a particular session. By enabling this feature, 
# a roundtrip to the database to obtain a user's credentials is avoided, 
# thereby, improving performance. Only applications that use the Single Sign 
# On will benefit from this feature.

# Turn caching on or off.
# For maximum performance, turn on caching. Please note that only applications
# that support PLSQL caching, such as Oracle Portal, will benefit from this
# feature. 
#
# The only time caching should be turn off is during debugging and caching
# is the suspect of the problem. Otherwise, in a production environment, it
# should always be turned on.
#
# If you are absolutely sure that your application does not make use of
# Oracle Portal or the Oracle Login Server and does not in any way make use of
# the OWA_CACHE packages in the OWA ToolKit, then you could choose to disable
# caching
#
# Syntax: PlsqlCacheEnable [On/Off]
# Default: Off
PlsqlCacheEnable On

# Set directory to write the cache files.
# This directive specifies where to put the cached contents. 
#
# For PLSQL cache, all cache files will be created under a directory called 
# "plsql" relative to specified caching directory. 
#
# For Session Cookie cache, all cache files will be created under a directory 
# called "session" relative to specified caching directory.
#
# This directory must exists or Apache will not start. 
#
# On Unix, this directory must have write permissions by the owner of the
# child httpd processes. In other words, if Apache is running as user nobody,
# then this directory must have its permissions set so that user nobody can
# write to it.
#
# Syntax: PlsqlCacheDirectory [directory]
# Default: [none]
PlsqlCacheDirectory %ORACLE_HOME%/Apache/modplsql/cache

# Set the total size of the cache.
# This setting limits the amount of space the cache is allowed to use. Both
# PLSQL cache and Session Cookie cache shares this cache space. Please 
# note that this setting is not a hard limit. It might exceed the limit 
# temporarily during normal processing. This is normal behavior.
#
# This parameter takes bytes as the value. Therefore :
# 1 Megabyte  = 1048576  bytes
# 10 Megabyte = 10485760 bytes
#
# Syntax: PlsqlCacheTotalSize [number]
# Default: 20971520 (20 Megabyte) 
PlsqlCacheTotalSize 20971520

# Set the size of the space used by the cache after cleanup has been performed.
#
# Cleanup happens whenever cleanup starts and the total size of the cache is 
# exceeded. This directive allows you to specifies the total size of the 
# cache to maintain after the cleanup has been performed. This ensures that 
# a large of the cache is still around after cleanup. 
#
# This directive is useful in fine tuning the cleanup algorithm. Since cleanup
# takes quite some time to complete, this directive allows you to tune it to
# your environment. If it is set to a high number, cleanup will finish faster
# and takes less CPU cycles, but it will happen more frequently because it 
# didn't thoroughly clean the cache in each run. If it is set to a low number, 
# cleanup will run longer, but it will happen less frequently because it
# did thoroughly clean the cache in each run. Therefore, depending on how a
# system uses the cache system, this setting can be tweaked to best match it.\
#
# In general, setting this directive to about 50-70% of the total cache size 
# will be sufficient. For example:
# 
# PlsqlCacheTotalSize    1000000
# PlsqlCacheCleanupSize   600000 
#
# This parameter takes bytes as the value.
#
# Syntax: PlsqlCacheCleanupSize [number]
# Default: 10485760 (10 Megabyte)
PlsqlCacheCleanupSize 10485760

# Set the amount of time (in minutes) in which the cleanup should start.
#
# This directive allows you to control when cleanup actually happens. This
# interval is amount of time passed after the previous cleanup session. In
# general, if you are low on disk space, set this number to a small amount
# of time will help free up used disk space. However, you have have lots of
# disk space, setting this to a high number will ensure better cache hits.
#
# Syntax: PlsqlCacheCleanupInterval [number]
# Default: 1440 (24 hours)
PlsqlCacheCleanupInterval 720 

# Set the maximum size a cache file can be.
#
# This directive is to prevent the case in which one file can fill up the
# entire cache. In general, setting this directive to about 1-10% of the 
# total cache size will be sufficient.
#
# Syntax: PlsqlCacheMaxSize [number]
# Default: 1048576 (1 Megabyte) 
PlsqlCacheMaxSize 1048576

Configuring mod_plsql For Use With WebDB 2.x

Although WebDB 2.x is not certified with Oracle9iAS Release 2 (9.0.2), there are no known issues that would prevent you from using WebDB 2.x with mod_plsql. Follow these steps to configure mod_plsql to run with WebDB 2.x instances:

  1. Drop any older OWA packages in OWA_PUBLIC or OAS_PUBLIC.

  2. Install the latest OWA packages shipped with mod_plsql.

  3. Specify the following DAD configuration in dads.conf for the WebDB 2.x schema:

    PlsqlAuthenticationMode Basic
    PlsqlDocumentTablename schema.wwv_document
    PlsqlUploadAsLongRaw **     
    
  4. Connect to the database as the owner of the site and run ORACLE_HOME/Apache/modplsql/owa/wwvdocs.sql and ORACLE_HOME/Apache/modplsql/owa/wwvdocb.plb.

    This enables WebDB document upload/download capability for 2.x websites.

mod_proxy

This module provides proxy capability for FTP, CONNECT (for SSL), HTTP/0.9 and HTTP/1.0.

See Also:

Module mod_proxy in the Apache Server documentation 

mod_rewrite

This module provides an engine for rewriting URLs.

See Also:

Module mod_rewrite in the Apache Server documentation 

mod_setenvif

This module enables you to set environment variables based on characteristics of a request.

See Also:

Module mod_setenvif in the Apache Server documentation 

mod_so

This module loads executable code and modules into the server at start-up time.

See Also:

Module mod_so in the Apache Server documentation 

mod_speling

This module attempts to correct misspelled or miscapitalized URLs.

See Also:

Module mod_speling in the Apache Server documentation 

mod_status

This module displays an HTML page of server activity and performance.

See Also:

Module mod_status in the Apache Server documentation 

mod_unique_id

This module creates a unique id for each request.

See Also:

Module mod_unique_id in the Apache Server documentation 

This module is available for UNIX systems only.

mod_userdir

This module maps requests to user-specific directories.

See Also:

Module mod_userdir in the Apache Server documentation 

mod_usertrack

This module tracks user activity by creating a clickstream log.

See Also:

Module mod_usertrack in the Apache Server documentation 

mod_vhost_alias

This module enables dynamically configured mass virtual hosting.

See Also:

Module mod_vhost_alias in the Apache Server documentation 


Go to previous page Go to next page
Oracle
Copyright © 2002 Oracle Corporation.

All Rights Reserved.
Go To Documentation Library
Home
Go To Product List
Solution Area
Go To Table Of Contents
Contents
Go To Index
Index