-1

我有 2 个运行的 Jboss 应用程序服务器配置了端口偏移量 100,第一个在 8009 上侦听,第二个在 8109 上侦听。它们被配置为与端口 4221 上的 apache mod 集群通信。

我的 Apache 服务器正在端口 8000 上侦听应用程序请求。

我读了几篇文章说您需要配置 .htaccess 文件并添加:

  RewriteEngine on
  RewriteRule ^.*$ http://localhost:*/SiteDown.html [L,R]

但是根据 Apache 官方文档,他们说使用 .htaccess 不是配置它的正确方法,因为这会对性能产生影响。他们建议使用 Directory 标签。

我的问题是如何设置标签以及将其放在配置文件中的什么位置,以便当我想要显示维护页面而不是提供应用程序页面时?

这是我在 mod_cluster 的 conf 文件中的配置

MOD_CLUSTER_ADDS

<IfModule manager_module>
  Listen 127.0.0.1:4221
  Maxsessionid 100
  ManagerBalancerName mycluster
  <VirtualHost 127.0.0.1:4221>
    <Location />
     Order deny,allow
     Deny from all
     Allow from 127.0.0.1
    </Location>

    KeepAliveTimeout 300
    MaxKeepAliveRequests 0
    AllowDisplay on
    ServerAdvertise off
    #ServerAdvertise on http://127.0.0.1:4221
    AdvertiseFrequency 5
    #AdvertiseSecurityKey secret
    #AdvertiseGroup 224.0.1.105:23364
    EnableMCPMReceive on

    <Location /mod_cluster_manager>
       SetHandler mod_cluster-manager
       Order deny,allow
       Deny from all
       Allow from 127.0.0
    </Location>
  </VirtualHost>
</IfModule>
4

1 回答 1

0

你的意思是,你有以下设置:

Client - Apache(mod_cluster) - JBoss node1+(cluster)+node2 

因此,每当您对后端 Jboss 节点进行任何维护时;那么 Jboss 不应该服务任何请求,而是应该显示一些维护页面?那是对的吗?

于 2016-08-30T14:35:11.100 回答