Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 11.0.1 (中文) » MobiLink - 服务器管理 » 使用 MobiLink 服务器技术 » 重定向器(不建议使用)

 

Windows 上 Netscape/Sun Web 服务器的 NSAPI 重定向器(不建议使用)

注意

现已不建议使用重定向器。可以使用中继服务器代替重定向器。请参见中继服务器

NSAPI 重定向器是为 Sun Java System Web 服务器提供的,该服务器以前称作 Sun One 和 Netscape iPlanet Enterprise Edition Web 服务器。

有关所支持版本的信息,请参见 [external link] http://www.sybase.com/detail?id=1062632

要在 Unix 上使用此重定向器,请参见Unix 上 Netscape/Sun Web 服务器的 NSAPI 重定向器(不建议使用)

要将该重定向器与其它平台上的 Netscape/Sun Web 服务器配合使用,可以使用 Servlet 重定向器。请参见Servlet 重定向器(不建议使用)

♦  配置 NSAPI 重定向器
  1. 完成配置重定向器属性(适用于支持服务器组的重定向器)中的步骤。

  2. 如有必要,请将文件 iaredirect.dll 复制到 Web 服务器所在的计算机。此文件位于 install-dir\MobiLink\redirector\web-server 下,其中 web-server 是 NSAPI web 服务器的名称。

  3. 如果 Web 服务器不是位于重定向器所在的计算机,则必须将以下文件复制到该计算机,并确保这些文件位于您的路径 中。您所需的文件视所使用的加密方式(如果有)而定。

    以下文件位置相对于 install-dir

    设置 所需文件
    全部
    • bin32\dblgen11.dll1
    • bin32\dbicu11.dll
    • bin32\dbicudt11.dll
    ECC 加密
    • bin32\mlcecc11.dll
    RSA 加密
    • bin32\mlcrsa11.dll
    经 FIPS 认可的 RSA 加密
    • bin32\mlcrsafips11.dll
    • bin32\sbgse2.dll

    1 对于德语、日语和中文版本,请将 en 分别替换为 de、ja 和 zh。

    有关如何更改语言的信息,请参见了解区域设置语言

  4. 按如下说明更新 NSAPI Web 服务器的配置文件 magnus.confobj.conf

    所提供的示例文件

    为 MobiLink 服务器预配置的 magnus.confobj.conf 的示例副本,位于 install-dir\MobiLink\redirector\web-server 中,其中 web-server 是 NSAPI Web 服务器的名称。

    更新 magnus.confobj.conf 的以下区段。

    • magnus.conf 中,指定 iaredirect.dll 和重定向器配置文件的位置。

      在 Init 区段结尾添加以下文本,其中 location 是文件的实际位置(虽然 iaredirect.dll 和重定向器配置文件必须都位于 Web 服务器所在的计算机上或 Web 服务器可以访问的驱动器上,但它们可以处于不同的位置):

      Windows: 
      Init fn="load-modules" shlib="location/iaredirect.dll"
      funcs="redirector,initialize_redirector"
      Init fn="initialize_redirector" configFile="location/redirector.config"
    • obj.conf 中,指定要在 URL 中使用的重定向器的名称。

      在缺省对象区段的开头添加以下文本。除了可以将 mlredirect 更改为所需的任何内容外,此区段的其它内容应与下面所示的完全相同。所有 http://host:port/mlredirect/ml/* 形式的请求都将发送到与重定向器配合运行的其中一个 MobiLink 服务器。

      <Object name=default>
      NameTrans fn="assign-name" from="/mlredirect/ml/*" name="redirectToML"
    • obj.conf 中,指定重定向器调用的对象。在 default object 区段后添加以下区段:

      <Object name="redirectToML">
      Service fn="redirector" serverType="ml"
      </Object>
示例

以下是 magnus.conf 中需要进行自定义的区段的示例。

Init fn="load-modules" shlib="D:/iaredirect.dll"
funcs="redirector,initialize_redirector"
Init fn="initialize_redirector" configFile="D:/redirector.config"

以下是 obj.conf 中对重定向器有重要意义的区段的示例:

<Object name=default>
NameTrans fn="assign-name" from="/mlredirect/ml/*" name="redirectToML"
...
<Object name="redirectToML">
Service fn="redirector" serverType="ml"
</Object>
♦  测试您的配置
  1. 使用以下语法调用重定向器:

    http://host:port/mlredirect/ml/
  2. 检查日志文件以了解重定向器是否记录了请求。

    注意:此测试不会建立到 MobiLink 服务器的连接。