24.9.2. 配置 ISAPI 连接器以将客户端请求发送到 JBoss EAP


此任务配置一组 JBoss EAP 服务器,以接受来自 ISAPI 连接器的请求。它不包括用于负载平衡或高可用性故障转移的配置。

此配置在 IIS 服务器上完成,并且假定您已将 JBoss EAP 配置为接受来自外部 Web 服务器的请求。您还需要对 IIS 服务器的完整管理员访问权限,并将 IIS 配置为使用 ISAPI 连接器

创建属性文件和设置重定向
  1. 创建用于存储日志、属性文件和锁定文件的目录。

    此流程的其余部分假定您为此使用了目录 C:\connectors\。如果您使用不同的目录,请相应地修改说明。

  2. 创建 isapi_redirect.properties 文件。

    创建名为 C:\connectors\isapi_redirect.properties 的新文件。将以下内容复制到 文件。

    # Configuration file for the ISAPI Connector
    # Extension uri definition
    extension_uri=/jboss/isapi_redirect.dll
    
    # Full path to the log file for the ISAPI Connector
    log_file=c:\connectors\isapi_redirect.log
    
    # Log level (debug, info, warn, error or trace)
    log_level=info
    
    # Full path to the workers.properties file
    worker_file=c:\connectors\workers.properties
    
    # Full path to the uriworkermap.properties file
    worker_mount_file=c:\connectors\uriworkermap.properties
    
    #Full path to the rewrite.properties file
    rewrite_rule_file=c:\connectors\rewrite.properties
    Copy to Clipboard Toggle word wrap

    如果您不想使用 rewrite.properties 文件,请在行首加上 # 字符来注释掉最后一行。

  3. 创建 uriworkermap.properties 文件

    uriworkermap.properties 文件包含已部署应用程序 URL 之间的映射,以及哪个 worker 处理向它们的请求。下例中的 文件显示了 文件的语法。将您的 uriworkermap.properties 文件放在 C:\connectors\ 中。

    # images and css files for path /status are provided by worker01
    /status=worker01
    /images/*=worker01
    /css/*=worker01
    
    # Path /web-console is provided by worker02
    # IIS (customized) error page is used for http errors with number greater or equal to 400
    # css files are provided by worker01
    /web-console/*=worker02;use_server_errors=400
    /web-console/css/*=worker01
    
    # Example of exclusion from mapping, logo.gif won't be displayed
    # !/web-console/images/logo.gif=*
    
    # Requests to /app-01 or /app-01/something will be routed to worker01
    /app-01|/*=worker01
    
    # Requests to /app-02 or /app-02/something will be routed to worker02
    /app-02|/*=worker02
    Copy to Clipboard Toggle word wrap
  4. 创建 workers.properties 文件。

    Worker .properties 文件包含 worker 标签和服务器实例之间的映射定义。此文件遵循用于 Apache mod_jk 工作程序属性配置的同一文件的语法

    以下是 workers.properties 文件的示例 :工作程序名称( worker01worker02 )必须与 JBoss EAP undertow 子系统中配置的 instance-id 相匹配。

    将此文件放入 C:\connectors\ 目录中。

    # An entry that lists all the workers defined
    worker.list=worker01, worker02
    
    # Entries that define the host and port associated with these workers
    
    # First JBoss EAP server definition, port 8009 is standard port for AJP in EAP
    worker.worker01.host=127.0.0.1
    worker.worker01.port=8009
    worker.worker01.type=ajp13
    
    # Second JBoss EAP server definition
    worker.worker02.host=127.0.0.100
    worker.worker02.port=8009
    worker.worker02.type=ajp13
    Copy to Clipboard Toggle word wrap
  5. 创建 rewrite.properties 文件。

    rewrite.properties 文件包含为特定应用重写规则的简单 URL。重写路径使用名称值对来指定,如下例所示。将此文件放入 C:\connectors\ 目录中。

    #Simple example
    # Images are accessible under abc path
    /app-01/abc/=/app-01/images/
    Copy to Clipboard Toggle word wrap
  6. 使用 net stop 和 net start 命令重新启动 IIS 服务器。

    C:\> net stop was /Y
    C:\> net start w3svc
    Copy to Clipboard Toggle word wrap

IIS 服务器配置为根据特定应用将客户端请求发送到您配置的特定 JBoss EAP 服务器。

返回顶部
Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。 了解我们当前的更新.

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

Theme

© 2025 Red Hat