ヘッダーをスキップ
Oracle® Fusion Middleware Oracle WebLogic ServerにおけるWebサーバー1.1プラグインの使用
11g リリース1 (11.1.1)
B61009-06
  ドキュメント・ライブラリへ移動
ライブラリ
製品リストへ移動
製品
目次へ移動
目次

前
 
次
 

3 Oracle iPlanet Web Serverプラグインのインストールと構成

この章では、Oracle iPlanet Web Serverプラグインをインストールおよび構成する方法について説明します。これまでのリリースでは、このプラグインはNetscape Enterprise Serverプラグインと呼ばれていました。

この章の内容は次のとおりです。

3.1 Oracle iPlanet Web Serverプラグインの概要

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

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

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

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

3.2 Oracle iPlanet Web Serverプラグインのインストールと構成

この項では、Oracle iPlanet Web Serverプラグインのインストール前提条件およびその構成方法について説明します。

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

Oracle iPlanet Web Serverプラグインをインストールする前に、次のことを行います:

  • プラグインzipを展開する場所(PLUGIN_HOME; たとえば、/home/myhome/weblogic-plugins-1.1/)を作成します

  • 1.2項「バージョン1.1プラグインの入手」の説明に従って、Oracle iPlanet Web Serverプラグインをダウンロードします。

  • プラグインzip配布をWebサーバーのインストール・ディレクトリ(install-dir)に展開します。プラグインzip配布を展開する前に、install-dirディレクトリ内の既存のREADME.txtの名前を変更します。この配布には次のファイルが含まれています:

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

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

    README.txt

    配布、最新の更新、その他の正誤表固有の情報。

    bin/orapki.bat

    Oracleウォレットの構成に使用するorapkiツールです。

    jlib/*.jar

    orapki用Javaヘルパー・ライブラリ

    lib/mod_wl.so(Windowsでは.dll)

    WebLogicプロキシ・モジュール

    lib/*.so(.dll)

    ヘルパー・ライブラリ


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

  • サポートされているOracle iPlanet Web Serverインストール(7.0.9以上) - つまり、iplanet-host:iplanet-portをリスニングするiPlanetサーバー - をIPLANET_HOMEにインストールします。

    http://www.oracle.com/technology/software/products/ias/files/fusion_certification.htmlに記載されているOracle iPlanet Web Serverプラットフォームでバージョン1.1プラグインがサポートされています。

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

  • サポートされているバージョンのWebLogic Serverを構成済で、ターゲット・システムで実行しています。このサーバーは、プラグインzip配布を展開したシステム上で実行されている必要はないことに注意してください。サポートされているWebLogic Serverのバージョンは、次を参照してください。

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

3.2.2 Oracle iPlanet Web Serverプラグインのインストール

Oracle iPlanet Web Serverプラグインは、UNIXプラットフォーム用の共有オブジェクト(.so)およびWindows用のDLL (.dll)として配布されます。

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

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

または

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

magnus.confファイルはINSTANCE-DIR/configディレクトリに格納されています。ここで、INSTANCE-DIRはWebサーバーのインスタンス・ディレクトリです。詳細については、以下を参照:

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

3.2.3 Oracle iPlanet Web Serverプラグインの構成

この項では、Oracle iPlanet Web Serverプラグインを構成する方法について説明します。

obj.confファイルを検索して開きます。

デフォルトのobj.confファイルは、INSTANCE-DIR/configディレクトリに格納されています。ここで、INSTANCE-DIRはWebサーバーのインスタンス・ディレクトリです。
詳細については、以下を参照:

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

obj.confファイルを構成する方法には何種類かあります。

3.2.5項「obj.confファイル修正のガイドライン」を参照してください。obj.confファイルでは、WebLogic Serverにプロキシされるリクエストや他の構成情報を定義します。

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

2つの独立したppathsのオブジェクト定義の例を次に示します。各ppathは、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>

注意:

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


3.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アプリケーションのコンテキスト・ルートと一致する必要があります。

Oracle iPlanet Web 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によるプロキシが正しく機能するには、Oracle iPlanet Web ServerからJavaを無効にする必要があります。無効にしないと、SUN Oneが*.jspで終わるすべてのリクエストを処理しようとし、$doc_rootにリソースが見つからないため404エラーを戻すことになります。

Oracle iPlanet Web ServerからJavaを無効にするには、obj.confファイルでname= "default"
の下にある次の行をコメント・アウトし、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>
    

3.2.3.3 プラグインのテスト

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

  1. WebLogic Serverを起動します。

  2. Oracle iPlanet Web Serverを起動します。Oracle iPlanet Web Serverがすでに稼働中の場合は、サーバーを再起動または再構成する必要があります。

  3. 次のURLを使用して、Oracle iPlanet Web Serverプラグインをテストできます。この例で示されているデフォルトのWebアプリケーションに定義されているように、デフォルトのWebLogic Server HTMLページ、ウェルカム・ファイル、またはデフォルトのサーブレットが表示される必要があります。

    http://webserver_host:webserver_port/weblogic/
    

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

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

次の例は、iPlanetプラグインがバックエンドWebLogic Server (WLS)にリクエストをプロキシするように迅速に設定するための基本的な手順を示しています。

  1. %IPLANET_INSTANCE_HOME%\config\magnus.confファイルを編集して、次の文を追加します。

    ...
    Init fn="load-modules" shlib="%PLUGIN_HOME%\lib\mod_wl.dll"
    ...
    
  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>
    Debug="ALL" WLLogFile="C:\Temp\wl-proxy.log" DebugConfigInfo="ON"
    PathTrim="/wls"
    </Object>
    ...
    

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

  3. プロンプトに対し、次を入力して%PLUGIN_HOME%\libをPATHに追加します:

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

    注意:

    libの内容をIPLANET_HOME\libに追加するか、IPLANET_INSTANCE_HOME\bin\startservを編集してPATHを更新できます。


  4. プロンプトに対し、次を入力してiPlanetサーバーを起動します:

    %IPLANET_INSTANCE_HOME%\bin\startserv
    
  5. ブラウザからhttp://iplanet-host:iplanet-port/mywebapp/my.jspにリクエストを送信し、レスポンスを検証します。

3.2.5 obj.confファイル修正のガイドライン

Oracle iPlanet Web Serverプラグインを使用するには、obj.confファイルにいくつかの変更を加える必要があります。詳細については、以下を参照:

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

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

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