Hi,
First, thanks for your reply.
Here the outline of my config:
<VirtualHost *:1234>
# [...]
ProxyPass / balancer://lb/
ProxyPassReverse / balancer://lb/
</VirtualHost>
<Proxy balancer://lb>
# That works fine:
ProxySet lbmethod=byrequests
# This would lead to the error I mentioned:
#ProxySet lbmethod=byfoobar
# And several members:
BalancerMember http://xxx.xxx.xxx.xxx loadfactor=1
ProxyHTMLURLMap http://xxx.xxx.xxx.xxx http://yyy.yyy.yyy.yyy:1234
Header edit Location ^http://xxx.xxx.xxx.xxx
http://yyy.yyy.yyy.yyy:1234
</Proxy>
It could look like that my changes were lost during the entire build
process. But I checked after the configuring that the patch had been
applied. Compiling runs without any issues.
Thanks in advance,
Florian Schröder
Am Montag, den 02.03.2009, 17:46 +0100 schrieb Rainer Jung:
> What's you balancer configuration leading to the cited error?
>
> On 02.03.2009 16:34, Florian S. wrote:
> > Hi everyone!
> >
> > I'm desperately trying to implement an additional loadbalancing
> > algorithm. Did anyone succeeded in declaring own methods?
> >
> > The httpd-users-list did not give any reply, so I'll try it here once
> > again.
> >
> > I'm not able to find the error since I adapted the major part from the
> > original. After patching and compiling my 2.2.11, the standard methods
> > still work fine, but mine does not seem to exist:
> >
> > My error is:
> > ProxySet: unknown lbmethod lbmethod=byfoobar
> >
> > I changed the mod_proxy_balancer.c three times, as required:
> >
> > I added my function:
> > static proxy_worker *find_best_byfoobar(proxy_balancer *balancer,
> > request_rec *r)
> >
> > I added the struct:
> > static const proxy_balancer_method byfoobar =
> > {
> > "byfoobar",
> > &find_best_byfoobar,
> > NULL
> > };
> >
> > And I finally registered it by inserting:
> > ap_register_provider(p, PROXY_LBMETHOD, "byfoobar", "0",&byfoobar);
> > in the
> > static void ap_proxy_balancer_register_hook(apr_pool_t *p)
> >
> > Very strange, since I did everything exactly in the same way as it had
> > been done for the built-in methods.
> >
> > Hoping that I'm posting to the right list
> > and
> > Thanks in advance,
> >
> > Florian Schröder