Apache 2.4 proxy_balancer and lbmethod_byrequest

Solution 1:

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

Solution 2:

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.


Solution 3:

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


Solution 4:

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.