I'm trying to build my Apache server with static modules. But run into some problems with the proxy_balancer module. I get an error:

[ssl:info] [pid 11863] AH01876: mod_ssl/2.4.10 compiled against Server: Apache/2.4.10, Library: OpenSSL/1.0.1i
[proxy:crit] [pid 11868] AH02432: Cannot find LB Method: byrequests
[proxy_balancer:emerg] [pid 11868] (22)Invalid argument: AH01183: Cannot share balancer
[:emerg] [pid 11868] AH00020: Configuration Failed, exiting

When I look at the loaded modules using bin/apachectl -M there are no mod_lbmethod module there.

I've tryied to load the module by adding these lines to the configuration script --enable-lbmethod-byrequest and --with-lbmethod=byrequest but it does not show up in the modules list nor in the included folder.

Someone experienced this problem before and got a solution to it?


If you are using Apache 2.4 or above need to enable mod_lbmethod_byrequests also.But bellow 2.4 mod_proxy_balancer was enough. I also had this issue. Problem is mod_lbmethod_byrequests split off from mod_proxy_balancer in 2.3.


This can be resolved by enabling the module mod_lbmethod_byrequests, like so:

$ sudo a2enmod lbmethod_byrequests

This wasn't required in Apache 2.2.22, but is required by Apache 2.4


So I found the problem.. It was a simple typo, missing the plural form "s"..

Loaded the module using --enable-lbmethod-byrequests and it worked


In httpd.conf you will see following lines:

#LoadModule lbmethod_bybusyness_module "${PRODUCT_HOME}/modules/mod_lbmethod_bybusyness.so"
#LoadModule lbmethod_byrequests_module "${PRODUCT_HOME}/modules/mod_lbmethod_byrequests.so"
#LoadModule lbmethod_bytraffic_module "${PRODUCT_HOME}/modules/mod_lbmethod_bytraffic.so"

Un-comment out the line depending on the load balancing algo that you are going to use. In your case un-comment the following line:

#LoadModule lbmethod_byrequests_module "${PRODUCT_HOME}/modules/mod_lbmethod_byrequests.so"

after uncommenting:

LoadModule lbmethod_byrequests_module "${PRODUCT_HOME}/modules/mod_lbmethod_byrequests.so"

This should work fine.


Are you sure this is a problem you should bother solving? Why are you going down this path?

Apache's a great web server, and there is a place for mod_proxy in proxying a few URLs in simple single server environments where there is no front end caching and load balancing layer(s). If you want load balancing though, you're almost certainly better off putting it in a layer in front of Apache rather than using an apache module. Eg use Varnish or squid.

If you do keep going, you'll need to provide more info on exactly what you're doing in your build and configuration, and where and when the error appears.

I presume you do have the appropriate LoadModule directive in your apache config?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.