19.8.4. 配置 ISAPI Redirector 发送客户请求到 JBoss EAP 6
本节配置了一组 JBoss EAP 6 服务器接受来自 ISAPI Redirector 的请求。它没有包括对负载平衡和高可以性失效切换的配置。如果您需要这些功能,请参考 第 19.8.5 节 “配置 ISAPI Redirector 在多个 JBoss EAP 6 服务器间平衡客户请求”。
预备条件
- 您需要访问 IIS 服务器的完整管理员权限
过程 19.18. 编辑属性文件和设置重定向
创建一个目录来存储日志、属性文件和锁文件。
本过程剩余的部分将假定您在使用C:\connectors\目录。如果您使用了不同的目录,请相应地修改这些说明。创建
isapi_redirect.properties文件。创建名为C:\connectors\isapi_redirect.properties的文件。复制下列内容到文件里。# Configuration file for the ISAPI Redirector # Extension uri definition extension_uri=/jboss/isapi_redirect.dll # Full path to the log file for the ISAPI Redirector log_file=c:\connectors\isapi_redirect.log # Log level (debug, info, warn, error or trace) # Use debug only testing phase, for production switch to info log_level=debug # 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
创建
uriworkermap.properties文件uriworkermap.properties文件包含了部署的应用程序 URL 和处理请求的工作节点间的映射。下面的例子展示了这个文件的语法。请将您的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
创建
workers.properties文件。workers.properties文件包含工作标签和服务器实例间的映射定义。下面的示例文件展示了这个文件的语法。请将这个文件放入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 6 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 6 server definition worker.worker02.host=127.0.0.100 worker.worker02.port=8009 worker.worker02.type=ajp13
创建
rewrite.properties文件。rewrite.properties文件包含了专有应用程序的简单 URL 重写规则。如下例所示,重写路径使用名称-值对来指定的。请将这个文件放入C:\connectors\目录。#Simple example # Images are accessible under abc path /app-01/abc/=/app-01/images/
重启 IIS 服务器。
通过net stop和net start命令重启 IIS 服务器。C:\> net stop was /Y C:\> net start w3svc
根据应用程序配置 IIS 服务器发送客户请求到专门的 JBoss EAP 6 服务器。

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.