403在尝试访问/ mod_cluster-manager时?

Sha*_*man 3 apache jboss wildfly mod-cluster

我用Apache 2.4.6运行CentOS 7.我正在尝试使用mod_cluster 1.2.6创建Wildfly/JBoss集群.我已经在Mac OSX上成功实现了这一点,我只是想在服务器环境中启动并运行它.

我的群集和虚拟主机配置如下所示:

 LoadModule slotmem_module       modules/mod_slotmem.so
 LoadModule proxy_cluster_module modules/mod_proxy_cluster.so
 LoadModule advertise_module     modules/mod_advertise.so
 LoadModule manager_module       modules/mod_manager.so

 MemManagerFile /var/cache/httpd

<VirtualHost *:80>

  <Directory />
    Order deny,allow
    Allow from all
  </Directory>

  KeepAliveTimeout 60
  MaxKeepAliveRequests 0
  ManagerBalancerName myBalancer
  ServerAdvertise On
  AdvertiseFrequency 3
  EnableMCPMReceive

  <Location /mod_cluster-manager>
    SetHandler mod_cluster-manager
    Order deny,allow
    Allow from all
  </Location>
</VirtualHost>
Run Code Online (Sandbox Code Playgroud)

服务器启动正常,但是当我尝试访问时,http://localhost/mod_cluster-manager我得到403说拒绝权限.这是我的error_log文件中的确切消息:

[Wed Jul 30 11:53:21.547109 2014] [authz_core:error] [pid 6012] [client 127.0.0.1:36425] AH01630: client denied by server configuration: /mod_cluster-manager
Run Code Online (Sandbox Code Playgroud)

我没有遇到任何这样的问题,让它在OSX上工作,所以我不完全确定问题是什么或为什么我得到403.据我了解,该Allow from all指令应该足以授予我访问权限通过localhost连接.有没有其他人碰到类似的东西?我错过了什么吗?

Mic*_*cek 8

关于配置

是的,但修复是微不足道的:Apache HTTP Server 2.4.x使用mod_authz系统,需要稍微不同的配置,例如:仅允许EnableMCPMReceive来自内部网络的活动VirtualHost中的工作节点的MCMP消息10.10:

<Directory />
    Require ip 10.10.
</Directory>
Run Code Online (Sandbox Code Playgroud)

或者用于开发更方便:

<Directory />
    Require all granted
</Directory>
Run Code Online (Sandbox Code Playgroud)

无论如何,这是Apache HTTP Server 2.4.x的默认配置示例之一:

# Load mod_cluster modules
# Please, note:
#  - mod_cluster cannot coexist with proxy_balancer_module; disable it
#  - mod_cluster needs proxy_module and proxy_ajp_module loaded for AJP transport

LoadModule proxy_cluster_module modules/mod_proxy_cluster.so
LoadModule cluster_slotmem_module modules/mod_cluster_slotmem.so
LoadModule manager_module modules/mod_manager.so
LoadModule advertise_module modules/mod_advertise.so

# Place for slotmem files
MemManagerFile cache/mod_cluster

<IfModule manager_module>
  ## We suggest to use a restricted VirtualHost
  ## for receiving MCPM (Mod Cluster Protocol Message) from worker nodes. 
  Listen 6666
  <VirtualHost *:6666>
    <Directory />
      Require ip 127.0.0.1
    </Directory>
    ## Apache HTTP Server advertises its presence
    ## on 224.0.1.105:23364 by default.
    ServerAdvertise on
    EnableMCPMReceive

    ## Management and monitoring console
    <Location /mod_cluster_manager>
      SetHandler mod_cluster-manager
      Require ip 127.0.0.1
   </Location>
  </VirtualHost>
</IfModule>
Run Code Online (Sandbox Code Playgroud)

关于mod_cluster版本

请注意,mod_cluster 1.2.6.Final已过时,它包含几个已在较新版本中修复的性能和安全相关错误.

绝对下载mod_cluster 1.3.1.Final二进制文件或使用mod_cluster 1.3.1.Final Apache HTTP Server启用负载均衡器Docker镜像.您也可以自己编译模块; 就Linux环境而言,Dockerfile内容可能会引导您.