link rel="Stylesheet" href="../../dcommon/css/doccd.css" title="Default" type="text/css">
| Oracle&r
eg; HTTP Server Administrator's Guide 10g Release 1 (10.1) Part Number B12255-01 |
|
|
View PDF |
This chapter describes t he modules (mods) included in the Oracle HTTP Server. The modules ext end the basic functionality of the Web server, and support integration between Oracle HTTP Server and other Oracle Database component s.
Documentation from the Apache Software Foundation is referenced when applicable.
Table 7-1 lists all the Oracle HTTP Server modules discussed in this chapter.
|
Oracle HTTP Server Module s | |||
|---|---|---|---|
| < p class="TB">mod_mime | |||
|
| |||
| See Also:
Module |
Enables execution of CGI scripts based on fil e type or request method.
| See Also:<
/strong>
Module |
E nables manipulation of URLs in processing requests. It provides mapping between URLs and filesystem paths, and URL redirection capabi lities.
| See Also:
Module |
Enables sending files that contain their own HTTP headers. It is not supported by Oracle.
| See Also:
Module |
Enables user authentication with files based user lists.
Module |
Enables anonymous user access to protected areas (similar to ano nymous FTP, where the email addresses can be logged).
| <
strong class="NH">See Also:
Module |
Uses Berkeley DB files to provide user authentication.
This module is disabled in the Oracle HTTP Server and is not supported by Oracle.
This module is not supported by Oracle.
Uses MD5 Digest Authentication to provide user authe ntication.
This module is not supported by Oracle.
Generates directory indexes automatically.
| See Also:
Module |
Emulates CERN (Conseil Europeen pour le Recherche Nucleaire) HTTPD metafile seman tics. Metafiles are additional HTTP headers that can be produced for each file the server accesses, in addition to the typical set. p>
This module is not supported by Oracle.
< h2 class="H1">mod_certheadersEnables reverse proxies that terminate SSL connections in front of Oracle HTTP Server to transfer information reg
arding SSL connection, such as SSL client certificate information, to Oracle HTTP Server, and applications running behind Oracle HTTP
Server. This information is transferred from the reverse proxy to Oracle HTTP Server using HTTP headers. The information is transfer
red from the headers to the standard CGI environment variable, which mod_ossl or mod_ssl populates if the S
SL connection is terminated by Oracle HTTP Server. It also enables certain requests to be treated as HTTPS requests even though they
are received through HTTP.
Perform the following steps to configure mod_certheaders
code>:
LoadModule directive to httpd.conf
file.
AddCertHeader directive. This directive
takes a single argument, which is the CGI environment variable that should be populated from a HTTP header on incoming requests. For
example, to populate the SSL_CLIENT_CERT CGI environment variable, add the following line to httpd.conf:
AddCertHeader SSL_CLIENT_CERT
The AddCertHeader directive can be a global setting if it is placed in the base virtual server section of htt
pd.conf. It can be specific to a single virtual host by placing it within a virtual host container, or it can be specific to a
set of URIs by placing it within a <Directory> or <Location> container directive within httpd.conf. The combination of these directives are addi
tive, so that for a given URI, all directives that are specific to that URI will be added to any that are specific to that request's
virtual host, which will be added to any that is defined for that base virtual host.
Table 7-2 lists all the supported CGI environment variables with their corresponding HTTP header n ames.
| CGI Variabl e | Header Name | CGI Variable | Header Name |
|---|---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
< code>SSL-Cipher-Algkeysize |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
a>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<
/a>
|
|
|
|
|
|
|
|
<
a name="1054303">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tr>
|
|
|
<
a name="1054337">
|
|
|
a>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<
a name="1054395">
|
|
a>
|
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
|
|
|
|
|
|
|
|
|
<
a name="1054523">
|
mod_certheaders can be used to instruct Oracle HTTP Server to treat certain requests as if the
y were received through HTTPS even though they were received through HTTP. This is useful when Oracle HTTP Server is front-ended by a
reverse proxy or load balancer, which acts as a termination point for SSL requests, and forwards the requests to Oracle HTTP Server
through HTTPS.
For load balancers, mod_certheaders must be explicitly conf
igured to determine which requests should be treated as HTTPS requests. To do this, use the following directive:
SimulateHttps on
SimulateHttps can be embedded within a virtual host, such as:
<VirtualHost localhost:7777> SimulateHttps on . . . </VirtualHost>
This tells mod_certheader
s to treat every request handled by this virtual host as HTTPS, or the directive can be placed within a <LocationMatch>, <Directory>, or <DirectoryMatch> directive container such as:
< Location /foo/> SimulateHttps on </Location>
This limits it to URLs starting with /foo/.
Enables the server to run CGI scripts.
| See Also:
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 compi
led into the server by default.
This module requires the Extended API (EAPI). Oracle HTTP S erver always has EAPI-enabled.
This module is available on UNIX systems only.
Uses an older version of the MD5 Digest Authentication specification than that
used in mod_auth_digest to provide user authentication. mod_digest proba
bly only works with older browsers.
|
See Also:
Module |
Enables the server to perform 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/
|
|
Enables you to monitor performance of site components with Oracle's Dynamic Monitoring Service (DMS).
Enables you to control the environment for CGI scripts and SSI (Server Side Includes) pages by passing, setting, and unsetting environment varia bles.
Provides examples and g uidance 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.
Enables the server to generate Expires HTTP headers, which provide information to the client about document validity. D ocuments are served from the source if, based on the expiration criteria, the cached copy has expired.
| See Also:
Module |
Supports the FastCGI protocol, which enables you to mai ntain a pool of running servers for CGI applications, thereby eliminating start-up and initialization overhead.
| See Also:
Module |
Enables you to merge, r eplace, or remove HTTP response headers.
| See Also:
Module |
This module is not supported by Orac le.
Provides a filter that processes documents for SSI (Server Si de Includes) directives.
| See Also:
strong>
Module |
Sum marizes the entire server configuration, including all installed modules and directive settings.
|
See Also:
Module |
Enables serving of Internet Server extensions (such as .dll<
/code> modules).
It is available on the Windows platform only, and is not supported by Orac le.
Enables logging of client user agents. It is deprecated; yo
u should use mod_log_config instead of mod_log_agent.
This module is not supported by Oracle.
Provides configurable, customizable logging of server activities. You can choose the log format, and select or exclude individual r equests for logging, based on characteristics of the requests.
| See Also:
M
odule |
Enables logging of documents that reference documents on the server. It is deprecated; y
ou should use mod_log_config instead of mod_log_referer.
Module mod_log_referer in the Apache Server documentation.
Enables the server to determine the type of a file from its filename, and associate files with handlers for processing.
| See Also:
Module |
Enables the server to determine the MIME type of a file by examining a few bytes of its content. It is used in c
ases 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 |
Maps a list of files in to memory, useful for frequently requested files that are not changed often.
This module is not supported by Oracle.
Enables the server for content nego tiation (selection of documents based on the client's capabilities).
| See Also:
Module |
This module provides integration support with Oracle Notification Service (ONS) and OP MN (Oracle Process Manager and Notification Server).
< code>mod_onsint provides the following functionality:
mod_onsint provide
s a single process that receives notification for all modules within an Oracle HTTP Server instance.PROC_READY ONS notifications so that other components such as OPMN are notified that th
e listener is up and ready. It also provides information such as DMS metrics and information about how the listener can be contacted.
These notifications are sent periodically by mod_onsint as long as the Oracle HTTP Server instance is running.mod_onsint provides a monitor of the parent process. If it detects that the parent process has died, it kills all of the rema
ining child processes. When combined with OPMN, this provides restartability for Oracle HTTP Server in the case of a parent process f
ailure. mod_onsint ensures that all of the Oracle HTTP Server child processes die, leaving the ports open for a new Orac
le HTTP Server instance. OPMN ensures that a new instance is started once the failure of the original instance is detected.Due to the difference in architecture
of Oracle HTTP Server on UNIX and Windows, the implementation of mod_onsint varies slightly on these platforms.
On UNIX, mod_onsint spawns a process at module initialization time. This process is re
sponsible for watching the parent process as well as sending and receiving ONS messages. Callback functions from other modules intere
sted in ONS notifications are made in this process. For this information to be shared with other Oracle HTTP Server child processes,
the use of an interprocess communication method such as a memory mapped file must be used. If a failure of a parent process is detect
ed on UNIX, a signal is sent to all the other child processes, causing them to shut down.
O
n Windows, Oracle HTTP Server consists of only two processes, the parent and a multi-threaded child that handles all of the HTTP requ
ests. In this model, mod_onsint runs as a thread within the child process. This thread watches the parent process as wel
l as sending and receiving ONS messages. Callback functions from other modules interested in ONS notifications are made in the child
process. If a failure of the parent process is detected, the mod_onsint terminates the child process, effectively shutti
ng down Oracle HTTP Server.
There is no configuration of
mod_onsint needed to provide functionality equivalent to that provided with Oracle HTTP Server in Oracle9i Application Server, Release 2 (9.0.2), other than the loading of the module. There is only an optional directive called mod_onsint is running in. If OpmnHostPort is not specified, mod_o
nsint chooses an HTTP port automatically. However, in certain circumstances, you may want to choose a specific HTTP port and h
ostname that OPMN should use to ping the listener with.
OpmnHostPort takes a s
ingle argument which is a host:port string that specifies the values to pass to OPMN. For example, the following line wo
uld specify that OPMN should use the localhost interface and port 7778 to ping this listener:
< /a>OpmnHostPort localhost: 7778
This directive must be in the glo
bal section of the httpd.conf file. It cannot be embedded into any virtual host of loc
ation container. After installation, an OpmnHostPort directive is located in dms.con
f. It points OPMN to the Oracle HTTP Server "diagnostic port", which is a special localhost only virtual host.
You cannot combine directives using the one-argument syntax with directives using the two-argument syn tax. If you use the two-argument syntax, the default for groups without a group-specific secret key is 'disabled'.
This Oracle module enables strong cryptography for Oracle HTTP Server. It is a plug-in
to Oracle HTTP Server that enables the server to use SSL. It is very similar to the OpenSSL module, mod_ssl. However, i
n contrast to the OpenSSL module, mod_ossl is based on the Oracle implementation of SSL, which supports SSL, version 3,
and is based on Certicom and RSA Security technology.
This module embeds the Perl interpreter into the Oracle HTTP Server. This eliminates start-up overhead and enables you to wri te modules in Perl.
|
Note: The demonstration script for this module that is shipped with Oracle Database should be disable d in production environments. It is included only to verify that the installation was successful. |
This section provides info
rmation for mod_perl users working with databases. It explains how to test a local database connection and set character
forms.
The following section contains info rmation about using Perl to access the database. Perl scripts access databases using the DBI/DBD driver for Oracle. The DBI/DBD drive r is part of Oracle Database. It calls Oracle Callable Interface (OCI) to access the databases.
DBI must be enabled in httpd.conf for DBI to function. To do this, perform the fo
llowing steps:
httpd.conf us
ing a text editor.PerlModule Apache: :D
BI".PerlModule Apache: :
DBI".ORACLE_HOME/opmn/bin>
; opmnctl [verbose] restartproc ias-component=HTTP_ServerORACLE_HOME\opmn\bin> opmnctl [verbose] restartproc ia
s-component=HTTP_ServerFiles must be copied to ORACLE_HOME
em>/Apache/Apache/cgi-bin
#!<ORACLE_HOME< /em>>perl/bin/perl -w use DBI; my $dataSource = "host=<hos tname.domain>;sid=<orclsid>;port=1521"; my $userName = "scott"; my $password = "tiger"; my $dbhandle = DBI->connect("dbi:Oracle:$dataSource", $userNam e, $password) or die "Can't connect to the Oracle Database: $DBI::errstr\n"; prin t "Content-type: text/plain\n\n"; print "Database connection successful.\n"; ### No w disconnect from the database $dbhandle->disconnect or warn "Database disconn ect failed; $DBI::errstr\n"; exit;
You c an access the DBI scripts from the following locations:
http://<hostn ame.domain>:<port>/cgi-bin/<scriptname> htt p://<hostname.domain>:<port>/perl/<scriptname& gt;
If the script specifies "use Apache::DBI" instea
d of "use DBI", then it will only be able to run from http://<hostname.domain>/perl/<scriptname>.
The following is a sample Perl script for testing the d
atabase connection of a local seed database. To use the script to test another database connection, you must replace scott/tige
r 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->pr epare("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::er rstr 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 ######
SQL NCHAR datatypes have been refined in Oracle9i, and are now called reliable Unicode datatypes. S
QL NCHAR datatypes such as NCHAR, NVARCHAR2 and NCLOB allow you to store a
ny Unicode characters regardless of the database character set. The character set for those datatypes is specified by the national ch
aracter set, which is either AL16UTF-16 or UTF8.
This rel
ease of DBD::Oracle supports SQL NCHAR datatypes and provides driver extension functions to sp
ecify the character form for data binding. The following script shows an example to access SQL NCHAR data:<
/p>
# declare to use the constants for character forms use DBD::Oracle qw(:ora_forms); # connect to the database and get the database handle $d bh = 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 in Example 7-3, 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 va
lues of character form are either ORA_IMPLICIT or ORA_NCHAR. Setting the character form to ORA_IMPLIC
IT causes the application's bound data to be converted to the database character set, and ORA_NCHAR to the nation
al character set. The default form is ORA_IMPLICIT.
Another function is provid ed to specify the default character set form as follows:
# specify the default form to be N CHAR $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_fo
rm calls. Note that unlike the set_form function, this is a function on the database handle, so every statement f
rom the database handle with its default form specified has the form of your choice by default.
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.
# a declaration example for the constants ORA_IMPLICIT and ORA_NCHAR use DBD::Or acle qw(:ora_forms); # set the character form for the placeholder :nchar1 to NCHAR $sth-& gt;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 pl aceholders at once $sth->func( { 1 => ORA_NCHAR, 2 => ORA_NCHAR } , 'set_form' ); a>
This function sets the default character form for a da tabase handle.
$dbh->func( ORA_NCHAR , 'set_default_form' ); < a name="1014746">
This Oracle module connects the Oracle HTTP Server to an Oracle database, enabling you to create Web applications using Oracle stored procedures.
In order to access a Web-enabled PL/SQL application, configure a PL/SQL Database Access Descripto
r (DAD) for mod_plsql. A DAD is a set of values that specifies how mod_plsql connects to a database server
to fulfill an HTTP request. Besides the connect 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 PL/SQL Web ToolKit
needs to create a DAD to invoke the application.
Perform the following steps to create a DAD:
ORACLE_HOME
code>/Apache/modplsql/conf/dads.conf.Location.
For example, the directive <Location /myapp> defines a virtual path called "/myapp
code>" that will be used to invoke a PL/SQL Web Application through a URL like http://host:port/myapp/.
SetHandler" directive which directs Oracle
HTTP Server to enable mod_plsql to handle the request for the virtual path defined by the named Location
SetHandler pls_handler
Location> directive. Ty
pically, the following directives are used:
Order deny,allow Allow from all AllowOverride None
mod_plsql specific directives. For example:
PlsqlDatabaseUsername scott PlsqlDatabasePassword tiger PlsqlDatabaseConnectString orcl PlsqlAuthenticationMode Basic
</Location> directive which closes the group of directives for the named Location, an
d defines a single DAD.dadTool.pl" script located in /Apache/modplsql/conf.
| See Also:
"PlsqlDa tabasePassword" for instructions on performing the obfuscation. |
You can create additional DADs by defining other uniquely named Locations in
dads.conf.
This section contains the following topics:
mod_pls
ql configuration reside in the following three configuration files:
This file contains the LoadModule directive to load <
code>mod_plsql into Oracle HTTP Server, any global setting for mod_plsql, and include directives for dads.c
onf and cache.conf. This file is included by the Oracle HTTP Server configuration file ORACLE_HOME/Apache/Apache/conf/oracle_apache.conf on UNIX or ORACLE_HOME\Apache\Apache\conf\orac
le_apache.conf on Windows, which itself gets included in the primary Oracle HTTP Server configuration file httpd.conf.
This file c
ontains the configuration parameters for the PL/SQL database access descriptor (DAD). A DAD is a set of values that specifies how mo
d_plsql connects to a database server to fulfill a HTTP request.
This file contains the configuration settings for the file system caching functionality implemented in mod_plsql.
This configuration file is relevant only if PL/SQL applications use the OWA_CACHE package to cache dynamically generated
content in the file system.
| See Als
o:
Oracle HTTP Server mod_plsql User's Guide for details on caching functionality in |
tr>
Table 7-3 contains a list of mod_plsql configuration parameters. They are discussed in detail in later section
s.
While specifying a value for a configuration parameter, follow Oracle HTTP Server conven
tions for specifying values. For instance, if a value has white spaces in it, enclose the value with double quotes. For example:
Also, multi-line directives ena bles you to specify the same directive multiple times in a DAD.
| Configuration File | Parameters |
|---|---|
| < p class="TB">PlsqlDefaultPage | |
|
Note: Refer to |
The following section discusses the following parameters that can be specified in
plsql.conf:
PlsqlD
MSEnablePlsqlLogEnablePlsqlLogDirectoryPlsqlIdleSessionCleanupInterval<
/ul>
Enables Dynamic Monitoring Service (DMS) for mod_plsql.
| Cat egory | Value |
|---|---|
|
Syntax |
|
|
Default |
On |
Example |
|
Enab
les debug level logging for mod_plsql.
Debug level logging is meant to be used for debugging purposes only. When logging is enabled, log files are generated at:
as configured by PlsqlLogDirectory. This parameter should be set to "Off" un
less recommended by Oracle support to debug problems with mod_plsql.
To view m
ore details about the internal processing of mod_plsql, set this directive to "On". This causes mod_plsql t
o start logging for every request that is processed. The log files are generated as specified by the PlsqlLogDirectory directive.
| Category | Value |
|---|---|
|
Syntax |
PlsqlLogEnable |
|
Default |
<
td class="Informal">
|
|
Example |
PlsqlLo gEnable Off |
Specifies the directory where debug level logs are written out.
Set the directory name of the location where log files should be generated when logging is enab led. To avoid possible confusion about the location of this directory, an absolute path is recommended.
< p class="BP">On UNIX, this directory must have write permissions by the owner of the child httpd processes.| Category | < font face="Arial, Helvetica, sans-serif">Value |
|---|---|
|
Syntax |
<
p class="TB">PlsqlLogDirectory directory |
|
Default |
None |
|
Example |
|
Specifies the time (in m
inutes) in which the idle database sessions should be closed and cleaned by mod_plsql.
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, it is closed, and freed. This is done so that unused sessions can be c
leaned, and the memory is freed on the database side.
Setting this time to a low number hel
ps in faster cleanup of unused database sessions. Be aware that if this number is too low, then this may adversely affect the perform
ance benefits of connection pooling in mod_plsql.
If the number of open databa
se sessions is not a concern, you can increase the value of this parameter for best performance. In such a case, if the site is acces
sed frequently enough that the idle session cleanup interval is never reached for a session, then the DAD configuration parameter
For most installations, the default parameter value should suffice.
| Category | Value |
|---|---|
|
Syntax |
|
|
Default p> |
15 (minutes) |
|
Example |
|
This file contains the configuration parameters for the PL/SQL Database Access Descriptor (DAD).
This section describes all the DAD level parameters that can be specifie
d in the dads.conf file. Besides these directives, you can also specify additional Oracle HTTP Server directives that ca
n be specified in the context of a <Location> directive, such as:
Order deny,allow AllowOverride None
The following parameters are discussed in detail in the subsequent sections:
PlsqlAfterProcedurePlsqlAlwaysDescribeProcedurePlsqlAuthenticationModePlsqlBeforeProcedurePlsqlBindBucketLengthsPlsqlBindBucketWidthsPl
sqlCGIEnvironmentListPlsqlCom
patibilityModePlsqlDatabaseCo
nnectStringPlsqlDatabasePassw
ordPlsqlDatabaseUserName<
/code>PlsqlDefaultPagePlsqlDocumentPath
PlsqlDocumentProcedurePlsqlDocumentTablenamePlsqlErrorStylePlsqlExclusionListPlsqlInfoLoggingPlsqlMaxRequestsPerSessionPlsqlNLSLanguagePls
qlPathAliasPlsqlPathAliasProc
edurePlsqlSessionCookieName
a>PlsqlSesssionStateManagementPlsqlTransferModePlsqlUploadAsLongRawSpecifies the procedure to be invoked after calling the requested procedure. This enables you to put a hook point af ter the requested procedure is called. This is useful in doing SQL*Traces/SQL Profiles while debugging a problem with the requested p rocedure. This is also useful when you want to ensure that a specific call be made after running every procedure.
| Category | Value |
|---|---|
|
Syntax |
<
/a>
|
|
Default |
None |
|
Example |
|
Notes:
after_proc.Specifies whether mod_plsql should describe a p
rocedure before trying to execute it. If this is set to "On", then mod_plsql will always describe a procedure before inv
oking it. Otherwise, mod_plsql will only describe a procedure when its internal heuristics have interpreted a parameter
type incorrectly.
| Category | Value |
|---|---|
|
Syntax |
|
|
Default |
<
td class="Informal">
|
|
Example |
|
Notes:
a
lways_desc.Specifies the authentication mode to use for allow access through this DAD.
< a name="1039493">| Category | Value |
|---|---|
|
Syntax |
|
|
Default |
Basic |
|
Example |
<
p class="TB">PlsqlAuthenticationMode Basic |
Not es:
GlobalOwa, CustomOwa, PerPackageOwa) are used by very few PL/SQL appli
cations. The SingleSignOn mode is supported only for Oracle Application Server releases, and is used by Oracle Applicati
on Server Portal and Oracle Application Server Single Sign-On.Basic authentication, then you must include a valid username/password in the DAD configuration. For the enablesso and custom_auth.
PlsqlAuthenticationMode SingleSignOncustom_auth = Global translates to PlsqlAuthenticationMode GlobalOwacustom_auth = Custom translates to PlsqlAuthenticationMode CustomOwacustom_auth = PerPackage translates to PlsqlAuthenticationMode PerPa
ckageOwaAll other combinations translate to Basic.
| See Also:
"Securing Application Database Access through |
Specifies the procedure to be invoked befo re 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 tha t a specific call be made before running every procedure.
| Category | V alue |
|---|---|
|
Syntax |
|
|
Default |
None |
|
Example |
|
Notes:
before_proc.Specifies the rounding size to use while binding the number of elements in a collection bind. While executin
g PL/SQL statements, the Oracle database maintains a cache of PL/SQL statements in the shared SQL area, and attempts to reuse the cac
hed 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, an
d for collection bindings is also sensitive to the number of elements in the collection. Since mod_plsql binds statement
s dynamically, the odds of hitting the shared cache are low, and it may fill up with near-duplicates and lead to contention for the l
atch 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 a ssumed to be twice the last one.
| Category | Value |
|---|---|
|
Synt ax |
|
|
Default |
4,20,100,400 |
|
Example |
|
Notes:
bind_bucket_lengths.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 reus
e the cached statement if the same statement is executed again. Oracle's matching criteria requires that the statement texts be ident
ical, and that the bind variable data types match. Unfortunately, the type match for strings is sensitive to the exact byte size spec
ified, 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 w ill be assumed to be twice the last one.
The last bucket width must be equal to or less tha n 4000. This is due to the restriction imposed by OCI where array bind widths cannot be greater than 4000.
| Category | |
|---|---|
|
Syntax |
|
|
Default |
<
/a>
|
|
Example |
|
Notes: p>
bind_bucket_widths.S pecifies 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 only specify one environmen t variable for each directive.
You can add CGI environment variables from the Oracle HTTP S
erver environment by specifying the variable name. To remove a CGI environment variable, set it equal to nothing. To add your own nam
e-value pair, use the syntax myname=myvalue.
N otes:
owa_util.get_cgi_env.cgi_env_list.Specifies the compa
tibility mode for running mod_plsql. This parameter is supported only for Oracle Application Server releases, and is use
d when you are using mod_plsql with an older version of Oracle Application Server Portal. In such situations, if you are
running mod_plsql against a pre-9.0.2 version of Oracle Application Server Portal, this should be set to 1.
| Category | Value |
|---|---|
|
Syntax |
|
|
Default |
0 |
|
Example |
|
Notes:
mod_plsql in which mod_plsql incorrectly converted the p
lus symbol (+) to space characters for document downloads. Enabling the first bit in this flag will make it impossible t
o download documents that have a plus symbol (+) in the document name.Specifies the connection to an Oracle database.
| Category | Value |
|---|---|
|
Sy ntax |
If the format argument is not specified, then It is recommended that newer DADs do not
use the |
|
Default |
None |
|
Example |
|
| Category | Value |
|---|---|
|
Syntax |
|
|
Default |
None |
|
Example |
<
a name="1039805">
|
After making manual configuration changes to DAD passwords, it is recommended that the DAD passwords are obfuscate
d by running the "dadTool.pl" script located in ORACLE_HOME/Apache/modplsql/conf.
Following are the steps to obfuscate DAD passwords:
oracle using the following command:
$su - oracle
ORACLE_HOME environment variable to specify the path to th
e Oracle home directory for the current release and set the PATH environment variable to include the directory containin
g the Perl executable and the location of the dadTool.pl script.
On Bourne , Bash, or Korn Shell:
ORACLE_HOME=new_ORACLE_HOME_path;export ORACLE_HOME PATH=ORACLE_HOME/Apache/modplsql/conf:ORACLE_HOME/perl/bin:PATH;export PATH
On C or tcsh Shell:
setenv ORACLE_HOME n ew_ORACLE_HOME_PATH setenv PATH ORACLE_HOME/Apache/modplsql/conf:ORACLE_HOME/perl/bin:PA TH
On Windows:
set PA TH=ORACLE_HOME\Apache\modplsql\conf;ORACLE_ HOME\perl\5.6.1\bin\MSWin32-x86;%PATH%
ORACLE_HOME/lib directory in your shared library path. Table
7-4 shows the appropriate environment variable for each platform.
| Platform | Environment Variable< /th> |
|---|---|
|
AIX< /p> |
|
|
HP-UX |
|
|
a>
Linux, Solaris, and Tru64 UNIX |
|
For example, to set the SHLIB_PATH
environment in the Bourne shell on HP-UX systems, enter the following command:
$SHLIB _PATH=$ORACLE_HOME/lib:$SHLIB_PATH;export SHLIB_PATH
$ORACLE_HOME/bin in your set PATH=%ORACLE_HOME%\bin;%PATH%
mod_plsql
code> configuration directory for the current release of Oracle HTTP Server:
cd $ORACLE_H
OME/Apache/modplsql/conf
perl dadTool.pl -o
Notes:
PlsqlAuthenticationMode to Basic and uses dynamic
authentication.SingleSignOn authentication, this
parameter is the name of the schema owner.password.Specifies the username to use to logon to the database.
| Category | Value |
|---|---|
|
Syntax |
|
|
Default |
None |
|
Example |
|
Notes:
PlsqlAuthenticationMode
to Basic and uses dynamic authentication.SingleSignOn authentication, this parameter is the name of the schema owner.username.Specifies the default procedure to call if none is specified in the URL.
| Category | Value |
|---|---|
|
Syntax |
|
|
Default |
None |
|
Example |
|
Notes:
default_page.Specifies a virtual path in the URL that initiates document download form the document table. For example, if this paramet
er 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 a>
| Category | Value |
|---|---|
| Syntax | PlsqlDocumentPath string |
| Default | docs |
| Example | PlsqlDocumentPath docs |
Notes:
document_path.Specifies the procedure to call when a document download is initiated. This procedure is called to process the download.
| Category | Value |
|---|---|
|
Syntax |
|
|
Default |
None |
|
Example |
|
Notes:
document_proc.Specifies the table in the databas e to which all documents are uploaded.
| Category | Value |
|---|---|
|
Syntax |
|
|
Def ault |
None |
|
Example |
|
Notes:
document_table.Specifies the Error Reporting Mode for mod_plsql errors. This parameter accepts the following values:
mod_plsql indicates to Oracle HTTP Server the HTTP error that was encountered. Oracle HTTP Server then generat
es the error page. This can be used with the Oracle HTTP Server ErrorDocument directive to produce customized error mess
ages.mod_plsql gene
rates the error pages, usually a short message indicating the PL/SQL error that was encountered and PL/SQL exception stack, if any. F
or example:
scott.foo PROCEDURE NOT FOUND
ModplsqlStyle
. mod_plsql provides more details about the URL, parameters and also produces server configuration information. T
his mode is for debugging purposes only. Do not use this in a production system, since displaying internal server variables could be
a security risk.
| Category | Value |
|---|---|
|
Syntax |
<
td class="Informal">
|
|
Default |
|
|
Example |
|
I
n older versions of the product, this parameter was called error_style.
Specifies a pattern for ex
cluding 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 def
ault patterns excluded from direct URL access are: sys.*, dbms_*, utl_*, owa_*, <
code>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 pur
poses.
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.
Notes:
mod_plsql also disallows any fully qualified procedure names which contain special characters like tabs, newlines, c
arriage-returns, single-quotes, the reverse slash, the form feed, the open parenthesis, close parenthesis, and space. This cannot be
changed.exclusion_list.
Oracle HTTP Server mod_plsql User's Guide for more information reg arding security.
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.
By default, mod_plsql attempts to fetch 200 response lines of output where each line is of 255 bytes. In
situations where the response bytes are single-bytes, the response buffer is populated to the maximum and can pack 255*200=51000 byt
es for each round trip. However, for responses containing multi-byte data, the byte packing for each row could be less than ideal res
ulting in lesser bytes getting transferred for each round trip. If your application generates large pages frequently and the response
does not fit in one round trip, then consider setting this parameter higher. However, the memory usage for mod_plsql wi
ll increase.
| Category | Value |
|---|---|
|
Syntax |
PlsqlFetchBufferSize |
|
Default |
200 |
|
Example |
|
Notes:
mod_plsql makes to the database to fetch the response.get_page or get_pa
ge_raw fetching fewer bytes for each row (calculations in the OWA Web ToolKit are character-based and in the case of multi-byt
e characters, OWA packages assume a worst-case character byte size and do not attempt to pack each row to its maximum).response_array_
size.Specifies what mode mod_plsql should use to do extra performance logging.
The mode is:
InfoDebug: This l
ogs more information to the Apache's error_log. This is used in conjunction with Apache's "info" logging level. If the A
pache's logging level is not at least set to this high, this setting will be ignored.
| Categ ory | Value |
|---|---|
|
Syntax |
|
|
Default |
Empty |
tr>
|
Example |
|
This logging setting is useful for debugging problems in your PL/SQL application.
Specifies the maximum number of requests a pooled database connection should service before it is closed and re-opened.
| Category | Value |
|---|---|
|
Syntax |
|
|
Default |
1000 |
|
Example |
|
Notes:
reuse. Instead of taking a value of "Yes" or "No", the new paramete
r enables you to have finer control over the connection pool reuse in mod_plsql.Specifies the
NLS_LANG variable for this DAD. This parameter overrides the NLS_LANG environment variable. When this para
meter is set, the PL/SQL Gateway uses the specified NLS_LANG to connect to the database. Once connected, an alter sessio
n command is issued to switch to the specified language and territory. If the middle tier character set matches that of the database,
then no alter session call is issued by mod_plsql.
| Category th> | |
|---|---|
|
Syntax |
|
|
Default |
None |
|
Example |
|
Notes:
PlsqlTransferMode set to CHAR which means that the character set in PlsqlNLSLanguage needs to match the character set of the database. In one special case, where the da
tabase and mod_plsql are both using fixed-size character sets, and the character set width matches, the character set ca
n be different. The response character set is always the mod_plsql character set.PlsqlTransferMode is set to RAW, then this parameter can be ignored.nls_lang.Specifies a virtual path alias to map to a procedure call. This is application specific.
Syntax
PlsqlPathAlias string
Default
None
Example
PlsqlPathAlias url
Notes:
| See Also:
Oracle HTTP Server mod_plsql User's Guide for more details about path aliasing funct ionality. |
pathalias.Specifies the procedure to call when the virtual path in
the URL matches the path alias as configured by PlsqlPathAlias.
| Category | < /a> Value |
|---|---|
|
Syntax |
a>
|
|
Default |
None |
|
Example |
|
Notes:
| See Also:
Oracle HTTP Server mod_pl sql User's Guide for more details about path aliasing functionality. |
pathaliasproc.Specifies the cookie name whenPlsqlAuthenticationMode is set to SingleSignOn<
/code>. This parameter is supported only for Oracle Application Server releases, and is used by the Oracle Application Server Portal
and Oracle Application Server Single Sign-On.
| Category | Value |
|---|---|
|
Syntax |
|
|
Default |
Same as DAD name |
|
Example |
|
Notes:
SingleSignO
n authentication, this parameter can be omitted. In most other cases, the session cookie name should be omitted (and this para
meter automatically defaults to the DAD name).sncookiename.Specifies how package and session state should be cleaned up at the end of each mod_plsql request.
StatelessWithResetPackageState
code> causes mod_plsql to call dbms_session.reset_package_state at the end of each mod_plsql r
equest.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. Failu
re to do so causes erratic behavior, in which a request starts recognizing or manipulating state modified in previous requests.StatelessWithFastResetPackageState causes dbms_session.modify_package_state(dbms_session.reinitialize) at the end of each mod_p
lsql request. This API is a lot faster than the mode of StatelessWithResetPackageState, and avoids some latch con
tention issues, but exists only in database versions 8.1.7.2 and higher. This mode uses up slightly more memory than the default mode
.
Notes:
stateful.stateful=no or stateful=STATELESS_RESET cor
responds to PlsqlSessionStateManagement StatelessWithResetPackageState.stateful=STATELESS_FAST_RESET corresponds to PlsqlSessionStateManagement StatelessWithFas
tResetPackageState.stateful=STATELESS_PRESERVE
corresponds to PlsqlSessionStateManagement StatelessWithPreservePackageState.mod_plsql does not support stateful mode of operation. To equip PL/SQL applications with stateful behavior
, save state in cookies and/or in the database.
Specifies the transfer mode for data from the database back to <
code>mod_plsql. Most applications use the default value of CHAR.
| Catego ry | Value |
|---|---|
|
Syntax |
|
|
Default |
|
|
Example |
|
Notes:
CHAR mode is useless, since it always converts the response data from the database character set to the mod_plsql
character set.RAW transfer mo
de was not supported.Specifies the extensions to be uploaded as LONGRAW data type, as opp
osed to using the default BLOB data type. The default can be overridden by specifying multi-line directives of file exte
nsions for field. A value of '*' in this field causes all documents to be uploaded as LONGRAW.
| Category | < font face="Arial, Helvetica, sans-serif">Value |
|---|---|
|
Syntax |
<
p class="TB">PlsqlUploadAsLongRaw string multiline |
|
Default |
None |
|
Example |
|
Notes:
| See Also:
Oracle H TTP Server mod_plsql User's Guide for more details about upload and download processes and the structure of the restrictions on the document table format. |
upload_as_log_raw.mod_plsql. This file contains parameters which specify the
characteristics of the mod_plsql cache system.
The following parameter
s are specified in cache.conf file:
PlsqlCacheCleanupTimePlsqlCacheDirectoryPlsqlCacheEnablePlsqlCa
cheMaxAgePlsqlCacheMaxSizePlsqlCacheTotalSize
li>Specifies the time to start the cleanup of the cache storage.
This setting defines the exact day and time in which cleanup should occur. The frequency can be set as daily, weekly, and monthly. p>
Everyday"
is used. The cleanup starts everyday at the time defined. For example, Everyday 2:00. This causes the cleanup to happen
everyday at 2 AM (local time) in the morning.Sunday", "Monday", "Tuesday", and so on are used. For example, Wednesday 15:30. This causes the cleanup to happen every Wednesday at 3:30 PM (local time) in the afternoon.Everymonth" is used. The cleanup starts
at the Saturday of the month at the time defined. For example, Everymonth 23:00. This causes the cleanup to happen the
first Saturday of every month at 11:00 PM (local time) at night.
| Category | Value |
|---|---|
|
Syntax |
|
|
Default |
Saturday 23:00 |
|
Example |
|
Specifies the directory where cache files ar
e written out by mod_plsql. This directory must exist or else Oracle HTTP Server will not start.
On UNIX, this directory must have write permissions by the owner of the child httpd processes.
| Category | Value |
|---|---|
|
Syntax |
<
/a>
|
|
Default |
none |
|
Example |
|
In older versions, this parameter was called "cache_dir" and resides in the "[PLSQL Cache]" section of ORACL
E_HOME/Apache/modplsql/cfg/cache.cfg.
Enables mod_plsql caching.
| Category | Value |
|---|---|
|
Syntax |
PlsqlCacheEnable |
|
Default |
Off |
|
Exa mple |
PlsqlCacheEnable |
| Category | Value< /th> |
|---|---|
|
Syntax |
|
|
Def ault |
30 (30 days) |
|
Example |
|
Specifies the maximum possible size of a cache file.
This setting is to prevent the case in which one file can fill up th e entire cache. In general, it is recommended that this be set to about 1-3 percent of the total cache size.
a>| Category | Value |
|---|---|
|
Syntax |
|
|
Default |
< p class="TB">1048576 (1 MB) |
|
Example |
|
In older versions, this parameter was called " Specifies the total size of the cache directory. This setting limits
the amount of space the cache is allowed to use. Both PLSQL cache and Session Cookie cache share this cache space. Note that this set
ting is not a hard limit. It might exceed the limit temporarily during normal processing. This is normal behavior. The cleanup algorithm uses this setting to determine how much to reduce the cache files. Therefore, the real
space limit is the physical storage's available size. This parameter takes bytes as values;
Syntax Default 20971520 (20 MB) Example In older versions, this parameter was called " This module provides proxy capability for Oracle HTTP Server provides This module operates on the full URLs (including the path-info part) both in per
-server context ( The following topics are discussed in the subseque
nt sections: This section discusses the following Enables or disables the runtime rewriting
engine. If it is set to "Off", this module does no runtime processing at all. Use this directive to disable the module instead of co
mmenting out all the Rewrite configurations are not in
herited by default. This means that you need to have By specifying Sets the name of th
e file to which the server logs any rewriting action that it performs. If the name does not begin with a slash (/), then it is assume
d to be relative to the Sets the verbosity level of t
he rewriting log file. The default level 0 means no logging, while 9 or more means that practically all actions are logged. Explicitly sets the base URL for pre-directory rewrites. Rewrite rule can
be used in per-directory configuration ( If the URLs of your Web server are not directly related to physical file paths, you have to use max_size<
/code>" and resided in the "[PLSQL Cache]" section of in every ORACLE_HOME/Apache/modplsql/cfg/cache/cfg.
p>
PlsqlCacheTotalSize
Category
Valu
e
a>
PlsqlCacheTotalSize
a>
PlsqlCacheTotalSize 20971520total_size" and resided in the "[PLSQL Cache]
" section of ORACLE_HOME/Apache/modplsql/cfg/cache/cfg.mod_proxy
FTP, CONNECT (for SSL), HTTP/0.9, HTTP/1.
0, and HTTP/1.1.
See Also:<
/font>
mod_proxy in the Apache Server documentation.mod_rewrite
mod_rewrite as a tool for URL
manipulation. A rewriting engine based on a regular-expression parser is used by mod_rewrite to rewrite requested URLs.
The granularity of URL manipulations can be affected by the formats of server variables, environment variables, HTTP headers, and ti
me stamps.httpd.conf) and per-directory context (.htaccess) and ca
n generate query-string parts on result.mod_rewrite Rules Processing
mod_rewrite Dir
ectives
mod_rewrite directives:RewriteEngine
RewriteRule directives.ReWriteEngine On directive for each virtual host in which you want
to use it.RewriteOptions
RewriteOptions 'inherit'
, you can force the configuration of the parent by the children. In virtual-server context this means that the maps, conditions and r
ules of the main server are inherited. In directory context this means that conditions and rules of the .htaccess config
uration of the parent directory are inherited.RewriteLog
Server Root. To disable logging, either remove or comment out the RewriteLog direct
ive or use RewriteLogLevel 0. Avoid setting the filename to /dev/null to prevent logging. This can slow dow
n the server with no advantage.RewriteLogLevel
RewriteBase
.htaccess) files. When a substitution occurs for a new URL, the base URL should
be added into the server processing. To be able to do this, the module needs to know what the corresponding URL-prefix or URL-base is
. By default, this prefix is the corresponding file path itself. However, at most Web sites, URLs are not directly related to physica
l filename paths. In such cases, you have to use the RewriteBase directives to specify the correct URL-prefix..htaccess files where you want to use RewriteRule directives.
Assume the following per-directory configuration file:
## /ab c/def/.htaccess - - per-dir config file for directory /abc/def # /abc/def is the physical path of /xyz, RewriteEngine On RewriteBase /xyz RewriteRule ^oldstuff\.html$ newstuff.h tml
In Example 7-6, a req
uest to /xyz/oldstuff.html gets correctly rewritten to the physical file /abc/def/newstff.html.
Table 7-5 provide hints for using rewrite rules.
| Value | Definition strong> |
|---|---|
|
. |
Any single character |
|
[char] |
Any character listed within a square bracket |
|
b* |
Any charact er b any number of times |
|
.* |
Any character any number of times |
For example, if you want to redirect requests from /demo1, /d
emo2, and /demo3 to /alldemos, write the rewrite rule as one of the following:
< a name="1048853">RewriteRule /demo. /alldemos [R]
or
RewriteRule /demo [123] /alldemos [R]
If you intend that /DemoA, /DemoB, and /DemoC to be redirected to /alldemos, add NC (no case) to the preceding rewrite rules, such as:
RewriteRule /demo [123] /allde mos [R, NC]
This rewrite rule will not work to redirect from /demos, because "." works form one character only. To enable redirection of all URLs beginni
ng with "demo", irrespective of subsequent characters, use the rewrite rule as follows:
Rew riteRule ^/demo* /alldemos [R, NC]
In the preceding example, ^ me ans the beginning, * means any character after demo.
If there was a request for /demo
1/not_just_index.html, all the preceding rewrite rules would have redirected the request the request to /alldemos/index.
html, that may not be what you want. It is quite possible that you may want to redirect to the corresponding files in /a
lldemos, as listed in Table 7-6.
| Request for | a> Redirected to |
|---|---|
|
|
|
|
|
|
|
|
< code>/alldemos/lucky.jpg |
Then you have to use substi tution in your rewrite rule as follows:
RewriteRule ^/demos1(.*)$ //alldemos/$1 [R NC]
The explanation for this rule is:
Take the value of the expression, such as happy.html, go.jpg, and lucky.jpg, that appea
rs after demo1 as variables ($1) and substitute it after /alldemos/.
Module |
For redirecting requests from the DocumentRoot
code> to a directory called newroot, set the following mod_rewrite directives:
RewriteEngine On RewriteRule ^/(.*)$ /newroot/$1 [R]
For directing requested for files from one directory (olddir) to another (newdir),
set the following directives:
RewriteEngine On RewriteRule ^/olddir(. *)$ /newdir/$1 [R]
In each of these cases, you should ensure tha
t the requested resources are indeed available in the redirected location. The mod_rewrite module does not ensure the ex
istence of the requested resource in the new location.
For disabling all requests using the
HTTP TRACE method, set the following mod_rewrite directives:
RewriteEngine On RewriteCond %{REQUEST_METHOD} ^TRACE RewriteRule .* - [F]
This module enables you to set environment variables based on characteristics of a request.
Module |
This module loads executable code and modules into the server at start-up time.
|
See Also:
Module |
This module attempts to correct misspelled or miscapitalized U RLs.
This module displays an HTML page of server activity and performance.
Module |
This module creates a unique ID for each request.
| See Also:
Module |
This module is available on UNIX systems only.
This module maps requests to user-specific directories.
| See Also:
Mo
dule |
This module tracks user activity by creating a log.
| See Also:
Module |
< a name="1005649">
This module enables dynamically configured mass virtual hosti ng.
| See Also:
Module |