Call now: 252-767-6166  
Oracle Training Oracle Support Development Oracle Apps

 E-mail Us
 Oracle Articles
New Oracle Articles

 Oracle Training
 Oracle Tips

 Oracle Forum
 Class Catalog

 Remote DBA
 Oracle Tuning
 Emergency 911
 RAC Support
 Apps Support
 Oracle Support

 SQL Tuning

 Oracle UNIX
 Oracle Linux
 Remote s
 Remote plans
 Application Server

 Oracle Forms
 Oracle Portal
 App Upgrades
 SQL Server
 Oracle Concepts
 Software Support

 Remote S


 Consulting Staff
 Consulting Prices
 Help Wanted!


 Oracle Posters
 Oracle Books

 Oracle Scripts

Don Burleson Blog 









Browser/Environment Variables

Oracle Application Server Tips by Burleson Consulting

OHS has the capability to modify how it talks to different browser types.  Each browser has different implementations and some have bugs that require special attention.  OHS uses the module mod_setenvif to add this functionality.   OHS gets this information from the request?s header.  The directive BrowserMatch is used to set variables based on the requester?s browser.

    BrowserMatch "Mozilla/2" nokeepalive
    BrowserMatch "MSIE 4\.0b2;" nokeepalive downgrade-1.0 force-response-1.0

Here, OHS will inactivate the keepalive feature because Mozilla does not support it.   This version of Internet Explorer has a faulty implementation of HTTP 1.1, so OHS downgrades its responses to HTTP 1.0.  The directive BrowserMatchNoCase is functionally equivalent to BrowserMatch but is case insensitive.  Mod_setenvif also contains the SetEnvIf and SetEnvIfNoCase directives.  The SetEnvIf directive is used to check current variables and if they match, set a custom variable. 

SetEnvIf User-Agent ".*MSIE.*" nokeepalive ssl-unclean-shutdown

If the user-agent from the request header contains MSIE, then the variables nokeepalive and ssl_unclean_shutdown are set to true. 

Proxy Server

Apache implements a proxy server and caching with mod_proxy.  Oracle9iAS and OHS use Web Cache and so does not implement mod_proxy.  If you need to implement this feature, please refer to the Apache documentation. (Google ?Apache mod_proxy?).

Virtual Host

One of the most powerful capabilities of the Apache Web Server, and hence OHS, is the ability to host more than one complete web site with its own domain name, as if it were on a stand-alone machine.  The ability to support multiple web sites from one server is called Virtual Hosting. Virtual Hosts are easy to set up in the httpd.conf file and OHS uses a Virtual Host to support the Secure HTTP connection. 

Listen 4446
SSLPassPhraseDialog builtin
SSLSessionCache shmcb:/home/oracle/oraportal904/Apache/Apache/
SSLSessionCacheTimeout 300
SSLMutex file:/home/oracle/oraportal904/Apache/Apache/logs/ssl_mutex
SSLLog /home/oracle/oraportal904/Apache/Apache/logs/ssl_engine_log
SSLLogLevel warn
<VirtualHost _default_:4446>
        DocumentRoot "/home/oracle/oraportal904/Apache/Apache/htdocs"
        ServerAdmin you@your.address
        ErrorLog /home/oracle/oraportal904/Apache/Apache/
        TransferLog /home/oracle/oraportal904/Apache/Apache/
        Port 4445
        SSLEngine on
        SSLWallet file:/home/oracle/oraportal904/Apache/Apache/
        <Files ~ "\.(cgi|shtml)$">
            SSLOptions +StdEnvVars
        <Directory "/home/oracle/oraportal904/Apache/Apache/cgi-bin">
            SSLOptions +StdEnvVars
        SetEnvIf User-Agent ".*MSIE.*" nokeepalive ssl-unclean-
        CustomLog /home/oracle/oraportal904/Apache/Apache/
                   logs/ssl_request_log "%t %h %{SSL_PROTOCOL}x
                   %{SSL_CIPHER}x \"%r\" %b"

This looks like a lot, but most of it has already been covered.  So let?s walk through the code. 

First, come the server level directives.  OHS is directed to listen on port 4446.  Although we will cover Secure Socket Layers in detail in the chapter on Oracle9iAS Security, from what we already covered we can see that there are a number of log files identified and the SSLLOGLEVEL is set to warn. 

Once the server level directives are through we are ready to define the Virtual Host. Virtual Hosts can have separate hostnames, IP addresses, or ports.  Anything not defined within the Virtual Host block directives will be inherited from the default server parameters.    The first five parameters are explicitly defined.  They actually point to the same files as the default server because the Virtual Host is designed to replicate the default server, using Secure Socket Layer (SSL) for security. 

One important directive is the ServerName.  The ServerName is used to redirect links to other files, and if it is not defined, the OHS will have to hit the DNS to determine the server name for the Virtual Host?s IP. 

Through the remaining code you can see examples of Directory Container directives, Files Container directives, TransferLog and CustomLog.  Almost every default server parameter can be redefined for a Virtual Host.  Directives that establish the overall OHS server cannot be changed in a Virtual Host such as MinSpareServers, MaxSpareServers, StartServers etc.

The example Virtual Host is IP-based, using the default IP.  Another option is to use a Name-Based Virtual Host.  Name-based Virtual Hosts allow you to operate multiple hosts on the same IP address.  This must be supported by your DNS.  When the browser submits a request, it contains the server name it is requesting the document from.  OHS will accept the request and pass it to the named Virtual Host for servicing.  To use this feature, you must add the NameVirtualHost directive that identifies the communal IP, before any Virtual Host directives.

    ServerAlias bigdata

The example above introduces another directive, ServerAlias.  ServerAlias is used when the server needs to be accessible using more than one name.  This directive identifies multiple names for the same Virtual Host.  Local users can access the host by just using big data as the server name.  More commonly, ServerAlias is used to direct multiple host names to the same Virtual Host.

Dynamic Content

Since you are using Oracle9i Application Server, you will be using OHS to connect to your application to generate dynamic content.  The Oracle HPPT Server has the capability to generate dynamic content within the server using CGI and SSIs. 

CGI, or Common Gateway Interface, defines a method of communication used between the web server and various programs and scripts that generate the dynamic content.  Called CGI programs, they are in fact written in any language from Perl to C, or even a Korn script.  The only requirement for OHS to execute the program is that the OHS user must have execute rights on the program.  OHS uses the mod_cgi module to handle CGI scripts, including loading and executing operating system programs. 

We have already seen the use of the ScriptAlias directive to identify locations of CGI programs.  If the CGI program is located in a directory other than the those pointed to by ScriptAlias, that directory must have the ExecCGI enabled in either the .htaccess file or in the Directory directives for the directory in the httpd.conf file. 

The second method of including dynamic content is SSI or Server Side Includes.  SSI are directives in the HTML page that are parsed as the page is served to the client.  Instead of having a CGI program serve the entire page, SSI can be used to embed dynamic content from other documents.  These include other documents, CGI program scripts, or server environment variables, such as the current time, as the page is being served.  Since SSI requires that the pages be parsed as they are served, you must tell OHS which files to parse.  You do this by adding directives to the httpd.conf file.

AddType text/html  .shtml
AddHandler server-parsed .shtml

OHS will now parse all .shtml files as they are served, provided that the Directory directives for the location of the .shtml file has Includes enabled.  This option can also be set in the .htaccess file. 

This is a brief introduction to CGI and SSL to set the stage for later chapters.


This is an excerpt from "Oracle 10g Application Server Administration Handbook" by Don Burleson and John Garmany.

If you like Oracle tuning, you may enjoy the new book "Oracle Tuning: The Definitive Reference", over 900 pages of BC's favorite tuning tips & scripts. 

You can buy it direct from the publisher for 30%-off and get instant access to the code depot of Oracle tuning scripts.


Oracle Training at Sea
oracle dba poster

Follow us on Twitter 
Oracle performance tuning software 
Oracle Linux poster


Burleson is the American Team

Note: This Oracle documentation was created as a support and Oracle training reference for use by our DBA performance tuning consulting professionals.  Feel free to ask questions on our Oracle forum.

Verify experience! Anyone considering using the services of an Oracle support expert should independently investigate their credentials and experience, and not rely on advertisements and self-proclaimed expertise. All legitimate Oracle experts publish their Oracle qualifications.

Errata?  Oracle technology is changing and we strive to update our BC Oracle support information.  If you find an error or have a suggestion for improving our content, we would appreciate your feedback.  Just  e-mail:  

and include the URL for the page.


Burleson Consulting

The Oracle of Database Support

Oracle Performance Tuning

Remote DBA Services


Copyright © 1996 -  2017

All rights reserved by Burleson

Oracle ® is the registered trademark of Oracle Corporation.

Remote Emergency Support provided by Conversational