配置 Apache 的 mod_proxy 支持

必须使用 Apache mod_proxy 模块提供的代理支持配置 Apache HTTP Server,以将 Apache HTTP Server 实例配置为支持对 Change Management Server (CM Server) 进行代理访问。

关于此任务

详细信息可从 http://www.apache.org/ 获得。以下是步骤摘要。

过程

  1. 配置 Apache HTTP Server 来装入 mod_proxy 模块和该模块所依赖的其他模块。这通常需要在 Apache httpd.conf 文件中取消与 mod_proxy 支持相关的各 LoadModule 伪指令的注释。
    例如:
    LoadModule proxy_module modules/mod_proxy.so
    LoadModule proxy_connect_module modules/mod_proxy_connect.so
    LoadModule proxy_http_module modules/mod_proxy_http.so 
  2. 取消 httpd.conf<IfModule mod_Proxy.c> 块中的 ProxyRequests On 伪指令注释:
    <IfModule mod_proxy.c>
    ProxyRequests On
    </IfModule>

    如果要配置逆向代理支持,那么需要将 ProxyRequests 参数值从 On 更改为 Off。对于正向代理支持,需要将此参数保留为 On。将 ProxyRequests 设置为 Off 并不会禁用 ProxyPass 伪指令。

  3. httpd.conf<IfModule mod_proxy.c> 块中添加相应的 ProxyPassProxyPassReverse 伪指令。ProxyPassProxyPassReverse 伪指令特定于应用程序。

    在此示例中,hostname 是 CM Server 服务器主机的名字,而 port 是可选的端口号,如果更改了 CM Server 侦听的 HTTP 请求缺省端口,那么必须指定该端口号(请参阅更改缺省的 CM Server HTTP 端口)。

    ProxyPass /cqweb/ http://hostname[:port]/cqweb/
    
    ProxyPassReverse /cqweb/ http://hostname[:port]/cqweb/

    例如,以下伪指令将代理服务器配置为支持通过 Rational® ClearQuest® Web 接口对名为 CMserver_host 的主机上侦听端口 12081 的 CM Server 进程进行访问。

    ProxyPass /cqweb/ http://CMserver_host:12081/cqweb/
    ProxyPassReverse /cqweb/ http://CMserver_host:12081/cqweb/
    注意: 在此示例中指定的 Web 地址必须按指定原样写入 httpd.conf 文件(主机名和可选端口号除外)。

    对于 ClearQuest Web 接口,请为 cqweb Web 地址添加以下格式的 ProxyPassProxyPassReverse 伪指令:

    • ProxyPass /wpf/ http://hostname[:port]/wpf/

      ProxyPass /px/ http://hostname[:port]/px/

      ProxyPass /images/ http://hostname[:port]/images/

      ProxyPass /dct/ http://hostname[:port]/dct/

      ProxyPass /common/ http://hostname[:port]/common/

      ProxyPass /../view/ http://hostname[:port]/view/

      ProxyPass /view/ http://hostname[:port]/view/

      ProxyPass /cqweb/ http://hostname[:port]/cqweb/

      ProxyPass /cqattachments/ http://hostname[:port]/cqattachments/

      ProxyPassReverse / http://hostname[:port]/

      hostname 是 CM Server 服务器主机的名称,而 port 是可选端口号,如果更改了 CM Server 侦听的 HTTP 请求缺省端口,那么必须指定此端口号。以下示例支持通过 ClearQuest Web 接口对名为 CMserver_host 的主机上侦听端口 12081 的 CM Server 进程进行代理访问。
      ProxyPass         /wpf/ http://CMserver_host:12081/wpf/
      ProxyPass        /px/ http://CMserver_host:12081/px/
      ProxyPass        /images/ http://CMserver_host:12081/images/
      ProxyPass        /dct/ http://CMserver_host:12081/dct/
      ProxyPass        /common/ http://CMserver_host:12081/common/
      ProxyPass        /../view/ http://CMserver_host:12081/view/
      ProxyPass        /view/  http://CMserver_host:12081/view/
      ProxyPass        /cqweb/ http://CMserver_host:12081/cqweb/
      ProxyPass        /cqattachments/ http://CMserver_host:12081/cqattachments/
         ProxyPassReverse / http://CMserver_host:12081/

    在 CM Server 主机上安装 Rational ClearCase®、Rational ClearQuest 或任何其他 IBM® 产品的新发行版时,IBM 产品的 Web 接口使用的 Web 地址可能会更改。要查找 CM Server 主机上当前有效的 IBM 产品 Web 地址,请检查 CM Server conf/include 目录中的 *.conf 文件。应用程序 Web 地址作为 AliasJkMount 伪指令的自变量而嵌入。 例如,JkMount /CQWeb/* ajp13 指示 /CQWeb 是 CM Server 支持的 Web 地址(忽略尾部 /*)。


反馈