Search code examples
apachemod-proxymod-proxy-balancer

Apache Load Balancer Manager displays nothing


I set up proxy balancer for RoR application and need some troubleshooting so try to use /balancer-manager page. Also I use /server-status page and it works well but when I open http://myhost.com/balancer-manager I get following:

Load Balancer Manager for myhost.com

Server Version: Apache/2.2.15 (Unix) Server Built: Oct 6 2011 11:46:57

Apache/2.2.15 (Red Hat) Server at myhost.com Port 81

and nothing else. what am I doing wrong?

The configs are:

LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_balancer_module modules/mod_proxy_balancer.so
LoadModule proxy_connect_module modules/mod_proxy_connect.so
LoadModule status_module modules/mod_status.so
........
<Location /server-status>
    SetHandler server-status
    Order deny,allow
    Deny from all
    Allow from localhost
    Allow from 1.1.1.1
</Location>
<Location /balancer-manager>
    SetHandler balancer-manager
    Order Deny,Allow
    Deny from all
    Allow from localhost
    Allow from 1.1.1.1
</Location>
........
<VirtualHost *:80>
........
    <Proxy balancer://MyApp_cluster>
       BalancerMember http://localhost:4001
       BalancerMember http://localhost:4002
       BalancerMember http://localhost:4003
   </Proxy>
</VirtualHost>

Google give me nothing but this https://issues.apache.org/bugzilla/show_bug.cgi?id=41979 So there maybe an error(s) in my config but I can't figure it out. Thank you.


Solution

  • I had the same problem,I noticed that is due to the include statment.

    For example this code make balancers works but the manager fail (Notice that the Include is inside the virtual host):

    <VirtualHost *:80>
    
      ServerName aom.com
      ServerAlias 10.*.*.*
    
      DocumentRoot /var/www/vhosts/aom/htdocs
      LogLevel warn
      ErrorLog /var/www/vhosts/aom/logs/error.log
      CustomLog /var/www/vhosts/aom/logs/access.log "combined"
      Include /var/www/vhosts/aom/*.conf
    
      ServerSignature Off
    
    </VirtualHost>
    

    In this case both works:

         Include /var/www/vhosts/aoe/*.conf
       <VirtualHost *:80>
    
          ServerName aom.com
          ServerAlias 10.*.*.*
    
          DocumentRoot /var/www/vhosts/aoe/htdocs
          LogLevel warn
          ErrorLog /var/www/vhosts/aom/logs/error.log
          CustomLog /var/www/vhosts/aom/logs/access.log "combined"
          Include /var/www/vhosts/aom/*.conf
    
          ServerSignature Off
    
        </VirtualHost>
    

    If you need the include inside the virtual host you must put the handler inside it, like:

    <VirtualHost *:80>
    
      ServerName aom.com
      ServerAlias 10.*.*.*
    
      DocumentRoot /var/www/vhosts/aom/htdocs
      LogLevel warn
      ErrorLog /var/www/vhosts/aom/logs/error.log
      CustomLog /var/www/vhosts/aom/logs/access.log "combined"
      <Location "/manage-balancer">
        SetHandler balancer-manager
      </Location>
    
    
      Include /var/www/vhosts/aom/*.conf
    
      ServerSignature Off
    
    </VirtualHost>