Fusion Middleware Documentation
Advanced Search


Using Oracle WebLogic Server Proxy Plug-Ins 12.1.2
Close Window

Table of Contents

Show All | Collapse

4 Configuring the WLS Web Server Proxy Plug-In 12.1.2 for iPlanet Web Server

This chapter describes how to install and configure the WLS Web Server Proxy Plug-In 12.1.2 for iPlanet Web Server. In previous releases, this plug-in was referred to as the Netscape Enterprise Server plug-in.

This chapter contains the following sections:

4.1 Overview of the WLS Web Sever Proxy Plug-In 12.1.2 for iPlanet

The WLS Web Sever Proxy Plug-In 12.1.2 for iPlanet Web Server enables requests to be proxied from Oracle iPlanet Web Server to Oracle WebLogic Server. The plug-in enhances a Oracle iPlanet Web Server installation by allowing WebLogic Server to handle those requests that require the dynamic functionality of WebLogic Server.

The WLS Web Sever Proxy Plug-In 12.1.2 for iPlanet Web Server is designed for an environment where Oracle iPlanet Web Server serves static pages, and an Oracle WebLogic Server instance (operating in a different process, possibly on a different machine) is delegated to serve dynamic pages, such as JSPs or pages generated by HTTP Servlets. The connection between WebLogic Server and the WLS Web Sever Proxy Plug-In 12.1.2 for iPlanet Web Server is made using clear text or Secure Sockets Layer (SSL). To the end user—the browser—the HTTP requests delegated to WebLogic Server appear to come from the same source as the static pages. Additionally, the HTTP-tunneling facility of WebLogic Server can operate through the WLS Web Sever Proxy Plug-In 12.1.2 for iPlanet Web Server, providing access to all WebLogic Server services (not just dynamic pages).

The WLS Web Sever Proxy Plug-In 12.1.2 for iPlanet Web Server operates as a module within a Oracle iPlanet Web Server. The module is loaded at startup and later based on the configuration, certain HTTP requests are delegated to it.

For more information about Oracle iPlanet Web Server see, http://download.oracle.com/docs/cd/E18958_01/doc.70/e18789/chapter.htm

4.2 Installing and Configuring the WLS Web Sever Proxy Plug-In 12.1.2 for iPlanet

The following sections provide information pertaining to the installation prerequisites and configuring the WLS Web Sever Proxy Plug-In 12.1.2 for iPlanet Web Server.

4.2.1 Installation Prerequisites

Before you install the Oracle iPlanet Web Server plug-in, do the following:

  • Create a plug-in zip extract location (PLUGIN_HOME; for example, /home/myhome/weblogic-plugins-12.1.2/)

  • Downloaded the WLS Web Sever Proxy Plug-In 12.1.2 for iPlanet Web Server, as described in Section 1.2, "Availability of WLS Web Server Proxy Plug-In 12.1.2."

  • Extract the plug-in zip distribution into the Web Server installation directory install-dir. Before extracting the plug-in zip distribution, rename the existing README.txt within install-dir. This distribution contains these files:

    Table 4-1 Files Included in the Oracle iPlanet Web Server Plug-in Zip

    (path)/filename Description

    README.txt

    information specific to the distribution, late-breaking updates, and other errata.

    bin/orapki.bat

    orapki tool for configuring Oracle wallets

    jlib/*.jar

    orapki helper Java libraries

    lib/mod_wl.so

    WebLogic proxy module

    lib/*.so(.dll)

    Helper libraries


  • Installed JDK 6 if you want to use SSL. You must have a JDK 6 installation if you want to use the orapki utility. The orapki utility manages public key infrastructure (PKI) elements, such as wallets and certificate revocation lists, for use with SSL.

  • Created a supported WLS Web Sever Proxy Plug-In 12.1.2 for iPlanet Web Server installation (7.0.9 or later) installed on IPLANET_HOME; that is, iPlanet server listening on iplanet-host:iplanet-port.

    The version 12.1.2 plug-in is supported on the WLS Web Sever Proxy Plug-In 12.1.2 for iPlanet Web Server platforms described in: http://www.oracle.com/technology/software/products/ias/files/fusion_certification.html

  • Created an iPlanet instance location (INSTANCE-DIR; for example, ${IPLANET_HOME}/https-foo.

  • Created a supported version of WebLogic Server is configured and running on a target system. Note that this server does not need to run on the system to which you extracted the plug-in zip distribution. For the supported WebLogic Server versions, see:

    http://www.oracle.com/technology/software/products/ias/files/fusion_certification.html

4.2.2 Installing the WLS Web Server Proxy Plug-In 12.1.2 for iPlanet Web Server

The WLS Web Server Proxy Plug-In 12.1.2 for iPlanet Web Server is distributed as a shared object (.so) for Unix platforms and as a DLL (.dll) for Windows.

To instruct Oracle iPlanet Web Server to load the native library (mod_wl.so on Unix) as a module, add the following line to the magnus.conf file.

Init fn="load-modules" shlib="mod_wl.so"

The magnus.conf file is located in the INSTANCE-DIR/config directory. Where INSTANCE-DIR is the web server instance directory. For more information, see:

http://download.oracle.com/docs/cd/E19146-01/821-1827/821-1827.pdf

4.2.3 Configuring the WLS Web Sever Proxy Plug-In 12.1.2 for iPlanet Web Server

This section provides information about configuring the WLS Web Sever Proxy Plug-In 12.1.2 for iPlanet Web Server.

Locate and open the obj.conf file

The default obj.conf file is located in the INSTANCE-DIR/config directory. Where INSTANCE-DIR is the web server instance directory.
For more information, see

http://download.oracle.com/docs/cd/E19146-01/821-1827/821-1827.pdf

There are different ways to configure obj.conf file.

Read guidelines for Section 4.2.5, "Guidelines for Modifying the obj.conf File". The obj.conf file defines which requests are proxied to WebLogic Server and other configuration information.

4.2.3.1 Proxying Requests by URL

If you want to proxy requests by URL, (also called proxying by path.) create a separate <Object> tag for each URL that you want to proxy and define the PathTrim parameter. The following is an example of an <Object> tag that proxies a request containing the string */weblogic/*

<Object ppath="*/weblogic/*">>
Service fn=wl-proxy WebLogicHost=myserver.com WebLogicPort=7001 PathTrim="/weblogic"
</Object>

Here is an example of the object definitions for two separate ppaths that identify requests to be sent to different instances of WebLogic Server:

<Object ppath="*/weblogic/*">>
Service fn=wl-proxy WebLogicHost=myserver.com WebLogicPort=7001 PathTrim="/weblogic"
</Object>
<Object name="si" ppath="*/servletimages/*">
Service fn=wl-proxy WebLogicHost=otherserver.com WebLogicPort=7008
</Object>

Note:

Parameters that are not required, such as PathTrim, can be used to further configure the way the ppath is passed through the WLS Web Server Proxy Plug-In 12.1.2 for iPlanet Web Server. For a complete list of plug-in parameters, see Section 7.1, "General Parameters for Web Server Plug-Ins"

4.2.3.2 Proxying the Request by MIME Type

If you are proxying requests by MIME type, add any new MIME types referenced in the obj.conf file to the mime.types file. You can add MIME types by using the iPlanet server console or by editing the mime.types file directly.

Note:

iPlanet Web Server 7.0.9 and above already defines the MIME type for JSPs. Change the existing MIME type from magnus-internal/jsp to text/jsp.

All requests with a designated MIME type extension (for example, .jsp) can be proxied to the WebLogic Server, regardless of the URL.

For example, to proxy all JSPs to a WebLogic Server, the following Service directive should be added:

Service method="(GET|HEAD|POST|PUT)" type=text/jsp fn=wl-proxy WebLogicHost=myserver.com WebLogicPort=7001 PathPrepend=/jspfiles

This Service directive proxies all files with the .jsp extension to the designated WebLogic Server, where they are served with a URL like this:

http://myserver.com:7001/jspfiles/myfile.jsp

The value of the PathPrepend parameter should correspond to the context root of a Web Application that is deployed on the WebLogic Server or cluster to which requests are proxied.

After adding entries for the WLS Web Server Proxy Plug-In 12.1.2 for iPlanet Web Server, the default <Object> definition will be similar to the following example:

<Object name="default">
AuthTrans fn="match-browser" browser="*MSIE*" ssl-unclean-shutdown="true"
NameTrans fn="pfx2dir" from="/mc-icons" dir="/export/home/ws/lib/icons" name="es-internal"
PathCheck fn="uri-clean"
PathCheck fn="check-acl" acl="default"
PathCheck fn="find-pathinfo"
PathCheck fn="find-index" index-names="index.html,home.html
ObjectType fn="type-by-extension"
ObjectType fn="force-type" type="text/plain"
Service method="(GET|HEAD|POST|PUT)" type="text/jsp" fn="wl-proxy" WebLogicHost="myweblogic.server.com" WebLogicPort="7100"
Service method="(GET|HEAD)" type="magnus-internal/directory" fn="index-common"
Service method="(GET|HEAD|POST)" type="*~magnus-internal/*" fn="send-file"
Service method="TRACE" fn="service-trace"
AddLog fn="flex-log"
</Object> 

You can add a similar Service statement to the default object definition for all other MIME types that you want to proxy to WebLogic Server.

For proxy-by-MIME to work properly you need to disable Java from the WLS Web Server Proxy Plug-In 12.1.2 for iPlanet Web Server otherwise, SUN One will try to serve all requests that end in *.jsp and will return a 404 error as it will fail to locate the resource under $doc_root.

To disable Java from the Oracle iPlanet Web Server, comment out the following in the obj.conf file under the name="default"
#NameTrans fn="ntrans-j2ee" name="j2ee"
and restart the web server. Optionally,

  • If you are proxying by path, enable HTTP-tunneling.

    If you are using weblogic.jar and tunneling the t3 protocol, add the following object definition to the obj.conf file, substituting the WebLogic Server host name and the WebLogic Server port number, or the name of a WebLogic Cluster that you want to handle HTTP tunneling requests.

    <Object name="tunnel" ppath="*/HTTPClnt*"
    Service fn=wl-proxy WebLogicHost=myserver.com WebLogicPort=7001
    </Object>
    
  • If you are tunneling IIOP, which is the only protocol used by the WebLogic Server thin client, wlclient.jar, add the following object definition to the obj.conf file, substituting the WebLogic Server host name and the WebLogic Server port number, or the name of a WebLogic Cluster that you want to handle HTTP tunneling requests.

    <Object name="tunnel" ppath="*/iiop*">
    Service fn=wl-proxy WebLogicHost=myserver.com WebLogicPort=7001
    </Object>
    

4.2.3.3 Testing the Plug-in

To test the Oracle iPlanet Web Server plug-in:

  1. Start WebLogic Server.

  2. Start Oracle iPlanet Web Server. If WLS Web Sever Proxy Plug-In 12.1.2 for iPlanet Web Server is already running, you must either restart or reconfigure the server.

  3. You can test the WLS Web Sever Proxy Plug-In 12.1.2 for iPlanet Web Server plug-in using the following URL. It should bring up the default WebLogic Server HTML page, welcome file, or default servlet, as defined for the default Web Application as shown in this example

    http://webserver_host:webserver_port/weblogic/
    

For information on how to create a default Web Application, see Developing Web Applications, Servlets, and JSPs for Oracle WebLogic Server

4.2.4 Example: Configuring the iPlanet Plug-in

The following example demonstrates basic instructions for quickly setting up the WLS Web Sever Proxy Plug-In 12.1.2 for iPlanet Web Server to proxy requests to a backend WebLogic Server (WLS).

  1. Edit %IPLANET_INSTANCE_HOME%\config\magnus.conf file and add the following:

    ...
    Init fn="load-modules" shlib="%PLUGIN_HOME%\lib\mod_wl.so"
    ...
    
  2. Open the %IPLANET_INSTANCE_HOME%\config\<vs-obj.conf> file (the default is %IPLANET_INSTANCE_HOME%\config\obj.conf) and add the following code:

    ... 
    <Object name="weblogic" ppath="*/wls/*">
    Service fn="wl-proxy" WebLogicHost=<wls-host> WebLogicPort=<wls-port>
    DebugConfigInfo="ON"
    PathTrim="/wls"
    </Object>
    ...
    

    For more information on configuring the contents of obj.conf, see Section 4.2.6, "Sample obj.conf File (Not Using a WebLogic Cluster)" and Section 4.2.7, "Sample obj.conf File (Using a WebLogic Cluster)".

  3. At the prompt, include the %PLUGIN_HOME%\lib in the PATH by entering:

    set PATH=C:\myhome\weblogic-plugin-12.1.2\lib:...
    

    Note:

    You can also update the PATH by copying the 'lib' contents to IPLANET_HOME\lib or editing the IPLANET_INSTANCE_HOME\bin\startserv.

  4. At the prompt, start the iPlanet server by entering:

    %IPLANET_INSTANCE_HOME%\bin\startserv
    
  5. Send a request to http://iplanet-host:iplanet-port/mywebapp/my.jsp from the browser and validate the response.

4.2.5 Guidelines for Modifying the obj.conf File

To use the WLS Web Sever Proxy Plug-In 12.1.2 for iPlanet Web Server, you must make several modifications to the obj.conf file. For more information, see

http://download.oracle.com/docs/cd/E19146-01/821-1827/821-1827.pdf

4.2.6 Sample obj.conf File (Not Using a WebLogic Cluster)

Below is an example of lines that should be added to the obj.conf file if you are not using a cluster. You can use this example as a template that you can modify to suit your environment and server. Lines beginning with # are comments.

  • Proxy requests by URL

    ## --------------BEGIN SAMPLE obj.conf CONFIGURATION---------
    # (no cluster)
    # Configure which types of HTTP requests should be handled by the
    # iPlanet NSAPI plug-In (and, in turn, by WebLogic). This is done 
    # with one or more "<Object>" tags as shown below. 
    # Here we configure the iPlanet plug-In module to pass requests for
    # "/weblogic" to a WebLogic Server listening at port 7001 on
    # the host myweblogic.server.com.
    <Object ppath="*/weblogic/*">
    Service fn=wl-proxy WebLogicHost=myweblogic.server.com WebLogicPort=7001 PathTrim="/weblogic"
    </Object>
    # Here we configure the plug-in so that requests that
    # match "/servletimages/" is handled by the
    # plug-in/WebLogic.
    <Object name="si" ppath="*/servletimages/*">
    Service fn=wl-proxy WebLogicHost=myweblogic.server.com WebLogicPort=7001
    </Object>
    ## -------------END SAMPLE obj.conf CONFIGURATION-------------------
    
  • Proxy requests by MIME type

    This Object directive works by file extension rather than
    # request path. To use this configuration, you must modify the existing line or add the following line to mime.types file.
    
    ## -----------BEGIN SAMPLE mime.types CONFIGURATION---------------------
    #
    # type=text/jsp exts=jsp
    ## ------------END SAMPLE mime.types CONFIGURATION----------------------
    
    ## -------------BEGIN SAMPLE obj.conf CONFIGURATION---------------------
    # This configuration means that any file with the extension
    # ".jsp" are proxied to WebLogic. Then you must add the
    # Service line for this extension to the Object "default",
    # which should already exist in your obj.conf file:
    <Object name=default>
    NameTrans fn=pfx2dir from=/ns-icons dir="c:/Export/Home/ns-icons"
    NameTrans fn=pfx2dir from=/mc-icons dir="c://Export/Home/ns-icons"
    NameTrans fn="pfx2dir" from="/help" dir="c:/Export/Home/manual/https/ug"
    NameTrans fn=document-root root="c:/Export/Home/docs"
    Service method="(GET|HEAD|POST|PUT)" type=text/jsp fn=wl_proxy WebLogicHost=myweblogic.server.com WebLogicPort=7001 PathPrepend=/jspfiles
    PathCheck fn=nt-uri-clean
    PathCheck fn="check-acl" acl="default"
    PathCheck fn=find-pathinfo
    PathCheck fn=find-index index-names="index.html,home.html"
    ObjectType fn=type-by-extension
    ObjectType fn=force-type type=text/plain
    Service method=(GET|HEAD) type=magnus-internal/imagemap fn=imagemap
    Service method=(GET|HEAD) type=magnus-internal/directory fn=index-common
    Service method=(GET|HEAD) type=*~magnus-internal/* fn=send-file
    AddLog fn=flex-log name="access"
    </Object>
    # The following directive enables HTTP-tunneling of the 
    # WebLogic protocol through the iPlanet plug-in.
    <Object name="tunnel" ppath="*/HTTPClnt*">
    Service fn=wl-proxy WebLogicHost=myweblogic.server.com WebLogicPort=7001
    </Object>
    #
    ## -------------END SAMPLE obj.conf CONFIGURATION---------------------
    

4.2.7 Sample obj.conf File (Using a WebLogic Cluster)

Below is an example of lines that should be added to obj.conf if you are using a WebLogic Server cluster. You can use this example as a template that you can modify to suit your environment and server. Lines beginning with # are comments.

  • Proxy requests by URL

    ## -------------BEGIN SAMPLE obj.conf CONFIGURATION-------------------
    # (using a WebLogic Cluster) 
    # 
    # Configure which types of HTTP requests should be handled by the
    # iPlanet module (and, in turn, by WebLogic). This is done 
    # with one or more "<Object>" tags as shown below. 
    # Here we configure the iPlanet module to pass requests for
    # "/weblogic" to a cluster of WebLogic Servers.
    <Object ppath="*/weblogic/*">
    Service fn=wl-proxy WebLogicCluster="myweblogic.com:7001,yourweblogic.com:7001, theirweblogic.com:7001" PathTrim="/weblogic"
    </Object>
    # Here we configure the plug-in so that requests that
    # match "/servletimages/" are handled by the
    # plug-in/WebLogic.
    <Object name="si" ppath="*/servletimages/*">
    Service fn=wl-proxy WebLogicCluster="myweblogic.com:7001,yourweblogic.com:7001, theirweblogic.com:7001"
    </Object>
    ## ----------------END OF SAMPLE obj.conf CONFIGURATION------------------
    
  • Proxy requests by MIME types

    # This Object directive works by file extension rather than
    # request path. To use this configuration, you must modify the existing line or add the following line to mime.types file.:
    ## -----------------BEGIN SAMPLE mime.types FILE -------------------------
    # type=text/jsp exts=jsp
    # 
    ## --------------------END SAMPLE mime.types------------------------------
    
    ## -------------BEGIN SAMPLE obj.conf CONFIGURATION-----------------------
    # This configuration means that any file with the extension
    # ".jsp" is proxied to WebLogic. Then you must add the
    # Service line for this extension to the Object "default",
    # which should already exist in your obj.conf file:
    <Object name=default>
    NameTrans fn=pfx2dir from=/ns-icons dir="c:/Export/Home/ns-icons"
    NameTrans fn=pfx2dir from=/mc-icons dir="c:/Export/Home/ns-icons"
    NameTrans fn="pfx2dir" from="/help" dir="c://Export/Home/manual/https/ug"
    NameTrans fn=document-root root="c://Export/Home/docs"
    Service method="(GET|HEAD|POST|PUT)" type=text/jsp fn=wl_proxy WebLogicCluster="myweblogic.com:7001, yourweblogic.com:7001, theirweblogic.com:7001",PathPrepend=/jspfiles
    PathCheck fn=nt-uri-clean
    PathCheck fn="check-acl" acl="default"
    PathCheck fn=find-pathinfo
    PathCheck fn=find-index index-names="index.html,home.html"
    ObjectType fn=type-by-extension
    ObjectType fn=force-type type=text/plain
    Service method=(GET|HEAD) type=magnus-internal/imagemap fn=imagemap
    Service method=(GET|HEAD) type=magnus-internal/directory fn=index-common
    Service method=(GET|HEAD) type=*~magnus-internal/* fn=send-file
    AddLog fn=flex-log name="access"
    </Object>
    # The following directive enables HTTP-tunneling of the 
    # WebLogic protocol through the NES plug-in.
    <Object name="tunnel" ppath="*/HTTPClnt*">
    Service fn=wl-proxy WebLogicCluster="myweblogic.com:7001, yourweblogic.com:7001, theirweblogic.com:7001"
    </Object>
    #
    ## -------------END SAMPLE obj.conf CONFIGURATION--------------------
    

4.3 Deprecated Directives for iPlanet Web Server

The WebLogic Server plug-in logs are now part of the Oracle iPlanet Server error log and are prefixed with weblogic: to easily identify them. Hence the directives WLLogFile and Debug are deprecated. If the configuration still uses any of these directives, the following note will appear:

weblogic: Debug & WLLogFile directives are deprecated for the current plugin release. Please Refer to the plugin documentation.

To enable plug-in logs, set log-level to fine.