プライマリ・コンテンツに移動
Oracle® Fusion Middleware Oracle WebLogic Serverプロキシ・プラグインの使用
12c (12.2.1.2.0)
E82686-02
目次へ移動
目次

前
次

4 iPlanet Web Server用プラグインの構成

この章では、iPlanet Web Server用Oracle WebLogic Serverプロキシ・プラグインをインストールして構成する方法を説明します。以前のリリースでは、このプラグインはNetscape Enterprise Serverプラグインと呼ばれていました。

この章には次の項が含まれます:

4.1 iPlanet用Oracle WebLogic Serverプロキシ・プラグインの概要

iPlanet Web Server用Oracle WebLogic Serverプロキシ・プラグインでは、リクエストをOracle iPlanet Web ServerからOracle WebLogic Serverへプロキシできます。このプラグインでは、サーバーの動的な機能を必要とするリクエストをOracle WebLogic Serverで処理できるようにすることで、Oracle iPlanet Web Serverのインストールが拡張されます。

iPlanet Web Server用Oracle WebLogic Serverプロキシ・プラグインは、静的ページがOracle iPlanet Web Serverによって提供され、JSPや、HTTPサーブレットで生成されたページなどの動的ページの提供をOracle WebLogic Serverのインスタンス(別のプロセスで、場合によっては別のマシン上で動作)が委任される環境用に設計されています。WebLogic ServerとiPlanet Web Server用Oracle WebLogic Serverプロキシ・プラグインは、クリア・テキストまたはSecure Sockets Layer (SSL)を使用して接続されます。エンド・ユーザーには(つまり、ブラウザでは)、WebLogic Serverへ委任されるHTTPリクエストは、静的ページと同じソースに由来しているように見えます。また、WebLogic ServerのHTTPトンネリング機能は、iPlanet Web Server用Oracle WebLogic Serverプロキシ・プラグインを介して動作し、すべてのWebLogic Serverサービス(動的ページのみではない)へのアクセスを提供できます。

iPlanet Web Server用Oracle WebLogic Serverプロキシ・プラグインは、Oracle iPlanet Web Server内のモジュールとして機能します。モジュールは起動時にロードされ、その後、構成に基づいて特定のHTTPリクエストがモジュールへ委任されます。

Oracle iPlanet Web Serverの詳細は、http://docs.oracle.com/docs/cd/E18958_01/doc.70/e18789/chapter.htmを参照してください

4.2 iPlanet用プラグインのインストールと構成

次の各項では、iPlanet Web Server用Oracle WebLogic Serverプロキシ・プラグインのインストール前提条件および構成方法について説明します。

4.2.1 インストールの前提条件

iPlanet Web Server用Oracle WebLogic Serverプロキシ・プラグインをインストールする前に、次のインストールと検証のタスクを行います。

  • プラグインのzipを解凍する場所(PLUGIN_HOME(たとえば、/home/myhome/weblogic-plugins-12.2.1/))を作成します

  • 「Oracle WebLogic Serverプロキシ・プラグインの入手方法」の説明に従って、iPlanet Web Server用Oracle WebLogic Serverプロキシ・プラグインをダウンロードします。

  • プラグインのzipディストリビューションをWebサーバーのインストール・ディレクトリ(install-dir)に解凍します。プラグインのzipディストリビューションを解凍する前に、install-dir内の既存のREADME.txtの名前を変更してください。このディストリビューションには、次のようなファイルが含まれています。


    表4-1 Oracle iPlanet Web ServerプラグインのZipに含まれているファイル

    (パス)/ファイル名 説明

    README.txt

    このディストリビューションに固有の情報、最新の更新およびその他の正誤表

    bin/orapki (Windowsでは.bat)

    Oracleウォレットを構成するためのorapkiツール

    jlib/*.jar

    orapkiヘルパーJavaライブラリ

    lib/mod_wl.so

    WebLogicプロキシ・モジュール

    lib/*.so

    ヘルパー・ライブラリ


  • SSLを使用するためにJDK 8をインストールします。orapkiユーティリティを使用する場合は、JDK 8のインストールが必要です。orapkiユーティリティでは、SSLで使用するための、ウォレットや証明書失効リストなどの公開鍵インフラストラクチャ(PKI)要素を管理します。

  • IPLANET_HOMEにインストールされたiPlanet Web Serverインストール(7.0.9以降) (つまり、iplanet-host:iplanet-portをリスニングするiPlanetサーバー)用のサポートされるOracle WebLogic Serverプロキシ・プラグインを作成します。

    http://www.oracle.com/technology/software/products/ias/files/fusion_certification.htmlで示されているiPlanet Web Serverプラットフォーム用Oracle WebLogic Serverプロキシ・プラグイン12c (12.2.1.1.0)では、バージョン12c (12.2.1.1.0)プラグインがサポートされています

  • iPlanetインスタンスの場所(INSTANCE-DIR (たとえば、${IPLANET_HOME}/https-foo))を作成します。

  • サポートされているバージョンのWebLogic Serverを構成し、ターゲット・システム上で実行します。このサーバーは、プラグインのzipディストリビューションを解凍したシステム上で実行する必要はありません。WebLogic Serverのサポートされているバージョンについては、次のサイトを参照してください。

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

4.2.2 iPlanet Web Server用Oracle WebLogic Serverプロキシ・プラグインのインストール

iPlanet Web Server用Oracle WebLogic Serverプロキシ・プラグインは、共有オブジェクト(.so)として配布されます。

Oracle iPlanet Web Serverに、モジュールとしてネイティブ・ライブラリ(mod_wl.so)をロードするよう指示するには、magnus.confファイルに次の行を追加します。

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

magnus.confファイルはINSTANCE-DIR/configディレクトリにあります。ここでのINSTANCE-DIRは、Webサーバー・インスタンスのディレクトリです。詳細は、次を参照してください。

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

4.2.3 iPlanet Web Server用Oracle WebLogic Serverプロキシ・プラグインの構成

この項では、iPlanet Web Server用Oracle WebLogic Serverプロキシ・プラグインの構成について説明します。このためには、obj.confファイルを構成します。obj.confファイルでは、WebLogic Serverにプロキシされるリクエストやその他の構成情報を定義します。

  1. obj.confファイルを見つけて開きます。

    デフォルトのobj.confファイルは、INSTANCE-DIR/configディレクトリにあります。ここでのINSTANCE-DIRは、Webサーバー・インスタンスのディレクトリです。詳細は、次の章を参照してください。

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

  2. obj.confファイルを構成します。

    obj.confファイルを構成する方法は複数あります。「obj.confファイルの変更のガイドライン」で説明するガイドラインを参照してください。

4.2.3.1 URLによるリクエストのプロキシ

URLによりリクエストをプロキシする(「パスによるプロキシ」とも呼ぶ)には、プロキシするURLごとに別個の<Object>タグを作成し、PathTrimパラメータを定義します。文字列*/weblogic/*を含むリクエストをプロキシする、<Object>タグの例を次に示します。

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

WebLogic Serverの別々のインスタンスに送信されるリクエストを特定する、別個の2つのppathのためのオブジェクト定義の例を次に示します。

<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>

注意:

ppathをiPlanet Web Server用Oracle WebLogic Serverプロキシ・プラグインを介して渡す方法をより詳細に構成するには、PathTrimなど、必須ではないパラメータを使用します。プラグイン・パラメータの完全なリストは「Webサーバー・プラグインの一般的なパラメータ」を参照してください

4.2.3.2 MIMEタイプによるリクエストのプロキシ

MIMEタイプによってリクエストをプロキシする場合は、obj.confファイルで参照されているすべての新しいMIMEタイプを、mime.typesファイルに追加します。MIMEタイプを追加するには、iPlanetサーバー・コンソールを使用するか、直接mime.typesファイルを編集します。

注意:

iPlanet Web Server 7.0.9以降では、すでにJSP用のMIMEタイプが定義されています。既存のMIMEタイプをmagnus-internal/jspからtext/jspに変更してください。

指定したMIMEタイプの拡張子(.jspなど)を持つすべてのリクエストを、URLに関係なく、WebLogic Serverにプロキシできます。

たとえば、すべてのJSPをWebLogic Serverにプロキシするには、次のServiceディレクティブを追加してください。

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

このServiceディレクティブによって、拡張子が.jspのすべてのファイルが、指定されたWebLogic Serverへプロキシされます。その際、ファイルは次のようなURLで提供されます。

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

PathPrependパラメータの値は、リクエストのプロキシ先となるWebLogic ServerまたはクラスタにデプロイされているWebアプリケーションのコンテキスト・ルートと一致する必要があります。

iPlanet Web Server用Oracle WebLogic Serverプロキシ・プラグインのエントリを追加した後のデフォルトの<Object>定義は、次の例のようになります。

<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> 

WebLogic Serverにプロキシするその他すべてのMIMEタイプのデフォルトのオブジェクト定義に、同様のService文を追加できます。

MIMEによるプロキシを正常に機能させるには、iPlanet Web Server用Oracle WebLogic Serverプロキシ・プラグイン12c (12.2.1.1.0)でJavaを無効にする必要があります。無効にしないと、SUN Oneによって末尾が*.jspのすべてのリクエストの処理が試みられ、$doc_rootの下にリソースが見つからないために404エラーが返されます。

Oracle iPlanet Web ServerでJavaを無効にするには、obj.confファイルでname="default"の下にあるNameTrans行をコメント・アウトします。その後、Webサーバーを再起動します。

#NameTrans fn="ntrans-j2ee" name="j2ee"

あるいは、次の操作を実行できます。

  • パスでプロキシする場合は、HTTPトンネリングを有効にします。

    weblogic.jarを使用しており、t3プロトコルをトンネリングする場合は、次のオブジェクト定義をobj.confファイルに追加し、HTTPトンネリング・リクエストを処理するWebLogic Serverホスト名とWebLogic Serverポート番号、またはWebLogicクラスタ名に置き換えます。

    <Object name="tunnel" ppath="*/HTTPClnt*"
    Service fn=wl-proxy WebLogicHost=myserver.com WebLogicPort=7001
    </Object>
    
  • WebLogic Serverシン・クライアント(wlclient.jar)で使用される唯一のプロトコルであるIIOPをトンネリングする場合は、次のオブジェクト定義をobj.confファイルに追加し、HTTPトンネリング・リクエストを処理するWebLogic Serverホスト名とWebLogic Serverポート番号、またはWebLogicクラスタ名に置き換えます。

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

4.2.3.3 プラグインのテスト

Oracle iPlanet Web Serverプラグインをテストするには、次の手順を実行します。

  1. WebLogic Serverを起動します。
  2. Oracle iPlanet Web Serverを起動します。
    iPlanet Web Server用Oracle WebLogic Serverプロキシ・プラグインがすでに実行されている場合は、サーバーを再起動するか、再構成する必要があります。
  3. iPlanet Web Server用Oracle WebLogic Serverプロキシ・プラグインをテストします。
    iPlanet Web Server用Oracle WebLogic Serverプロキシ・プラグインをテストするには、次のURLを使用します。このサンプルで示すデフォルトのWebアプリケーションに対して定義されているとおりに、デフォルトのWebLogic Server HTMLページ、ウェルカム・ファイルまたはデフォルトのサーブレットが開始されます
    http://webserver_host:webserver_port/weblogic/
    

デフォルトWebアプリケーションの作成方法の詳細は、Oracle WebLogic Server Webアプリケーション、サーブレット、JSPの開発を参照してください

4.2.4 例: iPlanetプラグインの構成

次の例では、リクエストをバックエンドWebLogic Server (WLS)にプロキシするよう、iPlanet Web Server用Oracle WebLogic Serverプロキシ・プラグインをすばやく設定するための基本的な手順を示します。

  1. $IPLANET_INSTANCE_HOME /config/magnus.confファイルを編集し、次を追加します。
    ...
    Init fn="load-modules" shlib="$PLUGIN_HOME/lib/mod_wl.so"
    ...
    
  2. $IPLANET_INSTANCE_HOME /config/<vs-obj.conf>ファイル(デフォルトは$IPLANET_INSTANCE_HOME /config/obj.conf)を開き、次のコードを追加します。
    ... 
    <Object name="weblogic" ppath="*/wls/*">
    Service fn="wl-proxy" WebLogicHost=<wls-host> WebLogicPort=<wls-port>
    DebugConfigInfo="ON"
    PathTrim="/wls"
    </Object>
    ...
    

    obj.confの内容の構成の詳細は、「obj.confファイルのサンプル(WebLogicクラスタを使用しない場合)」および「obj.confファイルのサンプル(WebLogicクラスタを使用する場合)」を参照してください。

  3. プロンプトで、次のコマンドを入力してLD_LIBRARY_PATHに$PLUGIN_HOME/libを追加します。
    set LD_LIBRARY_PATH=/home/user/weblogic-plugin-12.2.1/lib:..

    注意:

    'lib'の内容をIPLANET_HOME/libにコピーするか、$IPLANET_INSTANCE_HOME /bin/startservを編集しても、LD_LIBRARY_PATHを更新できます。

  4. プロンプトで、次のコマンドを入力してiPlanetサーバーを起動します。
    $IPLANET_INSTANCE_HOME /bin/startserv
    
  5. ブラウザからhttp://iplanet-host:iplanet-port/mywebapp/my.jspにリクエストを送信し、レスポンスを確認します。

4.2.5 obj.confファイルの変更のガイドライン

iPlanet Web Server用Oracle WebLogic Serverプロキシ・プラグインを使用するには、obj.confファイルにいくつかの変更を加える必要があります。詳細は、次の章を参照してください。

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

4.2.6 obj.confファイルのサンプル(WebLogicクラスタを使用しない場合)

次のコードは、クラスタを使用しない場合にobj.confファイルに追加する必要がある行の例を示しています。このサンプルをテンプレートとして使用し、ご使用の環境およびサーバーに合せて変更できます。#で始まる行はコメントです。

  • 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-------------------
    
  • MIMEタイプによるリクエストのプロキシ

    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 obj.confファイルのサンプル(WebLogicクラスタを使用する場合)

次のコードは、WebLogic Serverクラスタを使用する場合にobj.confに追加する必要がある行の例です。このサンプルをテンプレートとして使用し、ご使用の環境およびサーバーに合せて変更できます。#で始まる行はコメントです。

  • 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------------------
    
  • MIMEタイプによるリクエストのプロキシ

    # 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 iPlanet Web Serverの非推奨ディレクティブ

WebLogic Serverプラグイン・ログは、現在はOracle iPlanet Serverのエラー・ログの一部となっています。簡単に識別できるよう、次の例のように先頭にweblogic:というリファレンスが付いています。

[14/May/2015:23:18:34] fine (21904): for host 10.184.61.77 trying to GET /wls/testcluster, wl-proxy reports: <2190414316707144> weblogic: After trimming path: '/testcluster'

ディレクティブWLLogFileおよびDebugは非推奨です。構成でこれらのディレクティブが使用されている場合は、次のような注意が表示されます。

[14/May/2015:23:18:34] warning (21904): wl-proxy reports: weblogic: Debug & WLLogFile directives are deprecated for the current plugin release. Please Refer to the plugin documentation. 

プラグインのログを有効にするには、ログレベルをfineに設定します。