IBM® HTTP Server for WebSphere® Application Server 插件是 WebSphere Application Server 的 Web 服务器插件组件的组成部分。该插件使 IBM HTTP Server for WebSphere Application Server 可以与 WebSphere Application Server 进行通信。要使用此插件,您必须具有基于 Apache 并在 z/OS® 上运行的 IBM HTTP Server for WebSphere Application Server。
开始之前
安装此插件前,请在 z/OS 系统上安装 IBM HTTP Server for WebSphere Application Server 软件,并配置 IBM HTTP Server 实例。请参阅产品文档以安装 IBM HTTP Server for WebSphere Application Server on z/OS。
关于此任务
在 Web 服务器配置过程中,您将为 Web 服务器实例创建安装目录。在以下示例中,将对 Web 服务器安装目录使用值 /etc/websrv1。插件配置文件的建议位置是 Web 服务器安装目录中的子目录 Plugins。Plugins 目录将包含子目录 conf/WAS_webserver_name,而插件配置文件 plugin-cfg.xml 通常将位于此目录中。
此过程概述了如何安装并配置 IBM HTTP Server for WebSphere Application Server on z/OS 的插件。
过程
- 安装 Web 服务器插件。 使用 IBM Installation Manager 安装 WebSphere Application Server for z/OS 的 Web 服务器插件,并在目标 z/OS 系统上安装产品文件系统。缺省情况下,这些插件位于 /usr/lpp/WebSphere/Plugins/V9R0 目录中。
- 使用 Web 服务器实例的服务器标识登录 OMVS shell。 必须以此用户标识运行 install_plugin 和 ConfigureIHSPlugin 脚本,以便所有文件都属于 Web 服务器实例所属的组。
- 创建插件的安装目录。 插件的目录将包含插件在此 Web 服务器实例下运行时要使用的配置信息。此目录的建议位置是 Web 服务器实例安装目录中的子目录 Plugins。
要创建运行时安装映像,请运行命令
plugin_smp_location/bin/install_plugin.sh:
./install_plugin.sh
-pluginInstallLocation product_directory_of_plugin_code
-pluginRuntimeLocation install_directory_of_Web_server_plugin
-wasInstallLocation product_directory_of_WebSphere_Application_Server
以下是此命令的样本调用的示例:
cd /usr/lpp/WebSphere/Plugins/V9R0/bin
./install_plugin.sh
-pluginInstallLocation /usr/lpp/WebSphere/Plugins/V9R0/
-pluginRuntimeLocation /etc/websrv1/Plugins
-wasInstallLocation /usr/lpp/WebSphere/AppServer/V9R0
- 将 IBM HTTP Server for z/OS 实例配置为使用 Web 服务器插件。
运行命令
plugin_runtime_location/bin/ConfigureIHSPlugin.sh 以将 IBM HTTP Server 配置为使用 Web 服务器插件:
./ConfigureIHSPlugin.sh
-plugin.home install_directory_of_Webserver_plugin
-plugin.config.xml location_of_plugin-cfg.xml_file
-ihs.conf.file location_of_httpd.conf_file
-operating.system ZOS
-WAS.webserver.name Webserver_name_defined_to_WebSphere_Application_Server
-WAS.host.name hostname_or_IP_address_of_WebSphere_Application_Server
以下是此命令的样本调用的示例:
cd /etc/websrv1/Plugins/bin
./ConfigureIHSPlugin.sh
-plugin.home /etc/websrv1/Plugins
-plugin.config.xml /etc/websrv1/Plugins/config/webserver1/plugin-cfg.xml
-ihs.conf.file /etc/websrv1/conf/httpd.conf
-operating.system ZOS
-WAS.webserver.name webserver1
-WAS.host.name appsrv1.mycorp.com
- 在 WebSphere Application Server 中为本地或远程 z/OS Web 服务器创建 Web 服务器定义。
- 要在概要文件创建期间添加 Web 服务器定义,请使用
Profile Management Tool 或 zpmt 命令。
- 要将 Web 服务器添加到现有 WebSphere Application Server 概要文件,请使用管理控制台、createWebServerDefinition.jacl 脚本或 wsadmin createWebServer 命令。
对
WebSphere Application Server 定义 Web 服务器时:
- 对于 Web 服务器名称,请使用为 WAS.webserver.name 指定的值
- 对于 Web 服务器插件安装目录,请使用为 PluginRuntimeLocation 指定的值
- 配置插件。 使用管理控制台或发出 GenPluginCfg 命令以创建 plugin-cfg.xml 文件。
避免故障: 在完成此任务之前,必须删除
profile_root/config/cells
目录中的
plugin-cfg.xml 文件。否则,配置更改不会延续到
plugin-cfg.xml 文件。
gotcha
注: 两种方法都会创建 ASCII 格式的插件配置文件
plugin-cfg.xml。
- 如果您需要编辑此文件,请发出以下命令以便将该文件转换为 EBCDIC 格式:
iconv -f ISO8859-1 -t IBM-1047 plugin-cfg.xml.ASCII > plugin-cfg.xml.EBCDIC
- 编辑该文件,然后发出以下命令以便将其转换回 ASCII 格式:
iconv -f IBM-1047 -t ISO8859-1 plugin-cfg.xml.EBCDIC > plugin-cfg.xml.ASCII
要使用管理控制台:
- 选择。
- 选择自动生成插件配置文件,或者单击以下一个或多个主题以手动配置 plugin-cfg.xml 文件:
- 单击确定。
- 您可能需要停止并重新启动应用程序服务器,Web 服务器才能找到 plugin-cfg.xml 文件。
可能需要手动将 plugin-cfg.xml 文件复制到 Web 服务器插件安装目录中的正确位置。
- 确保使用 IBM HTTP Server for z/OS 所用的端口号的别名来配置虚拟主机。如果已手动配置 plugin-cfg.xml 文件,请在管理控制台中转至页面,并确保对虚拟主机匹配选中了以物理方式使用请求中指定的端口。
- 如果您要允许 Web 服务器插件使用专用头,请定义用于定义信任文件的 SSL 配置指令表。然后在管理控制台中,单击,接着在“容器设置”部分中单击 ,并为该传输链指定此指令表。
避免故障: 信任文件为 IBM HTTP Server for z/OS(基于 Apache)提供的功能与产品的先前版本中 TrustedProxy 定制属性为 HTTP Server for z/OS V5.3 提供的功能相同。
gotcha
如果您尝试使用专用头,但没有设置不包含信任文件定义的 SSL 配置指令表,那么将忽略这些专用头。如果专用头被忽略,那么应用程序服务器可能找不到请求的应用程序。
在您启用专用头的使用后,传输链的 SSL 入站通道信任它接收到的所有专用头。因此,您必须确保到传输链的 SSL 入站通道的所有路径都是可信任的。
- 如果要允许 Web 服务器插件使用系统授权工具 (SAF) 密钥环替代具有存储文件属性的 kdb 文件,那么您必须在管理控制台中创建以下两个定制插件属性。
- KeyringLocation,设置为 SAF 密钥环的目录位置
- StashfileLocation,设置为 ""(空)
请参阅有关 Web 服务器插件配置属性的信息,以获取关于如何在管理控制台中创建 KeyringLocation 和 StashfileLocation 以便在 SSL 配置中使用 SAF 密钥环的指示信息。另请参阅 plugin-cfg.xml 文件中的信息。
- 配置完成。 要激活配置,请停止并重新启动应用程序服务器和 IBM HTTP Server。
结果
如果再次启动 IBM HTTP Server 时成功调用了 IBM HTTP Server for z/OS 插件,那么将对插件日志文件
/plugin_runtime_dir/log/webserver_name/http_plugin.log 添加消息。在 http_plugin.log 中出现的消息类似于以下样本输出:
PLUGIN: Plugins loaded.
PLUGIN: --------------------System Information-----------------------
PLUGIN: Bld version: 9.0.0
PLUGIN: Bld date: Jun 13 2016, 09:55:09
PLUGIN: Webserver: IHS 390 Webserver: Http Plug-in Build Info: build level 9.0.0.0 (cf031208.05) release WAS90.ZNATV date 06/13/16 09:54:07
PLUGIN: Hostname = ZWASAXXX
PLUGIN: NOFILES = hard: 64000, soft: 64000
PLUGIN: MAX COREFILE SZ = hard: 4194304, soft: 4194304
PLUGIN: DATA = hard: INFINITE, soft: INFINITE
PLUGIN: --------------------------------------------------------------
下一步做什么
在正确配置应用程序服务器、IBM HTTP Server 和插件后:
- 用于 z/OS 平台的 WebSphere Application Server 可以使用此插件来执行常规的插件功能。
- 通过 IBM HTTP Server 和插件,请求可以从浏览器路由至部署了所请求的应用程序的应用程序服务器。新的请求将发送至随机选择的、部署了该应用程序的应用程序服务器。在建立会话后,后续请求将路由至对原始请求指定的应用程序服务器。
- 使用专用头作为将代理信息从 Web 服务器插件转发到 z/OS 系统上的应用程序服务器的机制。(否则,此信息不会与 HTTP 请求包括在一起。)