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 服务器技术 » 重定向器(不建议使用)

 

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

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

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

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

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

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

    所提供的示例文件

    magnus.confobj.conf 的示例副本位于 install-dir\MobiLink\redirector\web-server 中,其中 web-server 是 NSAPI Web 服务器的名称。可使用这些示例文件确认将以下部分放置于该文件的何处。

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

    • magnus.conf 中,指定 iaredirect.soredirector.config 的位置。

      在 Init 区段的尾部添加以下文本,其中 location 为文件的实际位置。(尽管 iaredirect.soredirector.config 都必须位于 Web 服务器所在的计算机上,但它们可以处于不同位置。)

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

      在 "default object" 区段的起始处添加以下文本。除了可以将 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="location/iaredirect.so"
funcs="redirector,initialize_redirector"
Init fn=" initialize_redirector " configFile="location/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 服务器的连接。