httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rainer Jung <rainer.j...@kippdata.de>
Subject Re: [users@httpd] apache 2.4.1 and mod cband
Date Thu, 23 Feb 2012 17:06:03 GMT
On 23.02.2012 13:35, Nick Edwards wrote:
> On 2/23/12, Rainer Jung<rainer.jung@kippdata.de>  wrote:
>> On 23.02.2012 01:25, Eric Covener wrote:
>>> On Wed, Feb 22, 2012 at 6:52 PM, Nick Edwards<nick.z.edwards@gmail.com>
>>> wrote:
>>>> Hi,
>>>> I know this may be a little off-topic, but am asking here because mod
>>>> cband has it seems been abandon-ware for few years now, even half the
>>>> authors I contacted have no idea about the main developers
>>>> whereabouts.
>>>>
>>>> mod_cband works fantastic, except in trying 2.4.1 of apache httpd it
>>>> no longer builds.
>>>> I hope someone has an idea on as to how to fix
>>>>
>>>> /usr/sbin/apxs -Wc,-Wall -Wc,-DDST_CLASS=3 -c src/mod_cband.c
>>>> /opt/apache/build/libtool --silent --mode=compile gcc -std=gnu99
>>>> -prefer-pic -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -D_LARGEFILE64_SOURCE
>>>> -g -O2 -pthread -I/usr/include/libxml2 -I/opt/apache/include
>>>> -I/opt/apache/include -I/opt/apache/include -Wall -DDST_CLASS=3 -c -o
>>>> src/mod_cband.lo src/mod_cband.c&&   touch src/mod_cband.slo
>>>>
>>>> src/mod_cband.c: In function 'mod_cband_create_traffic_size':
>>>> src/mod_cband.c:1054: warning: comparison with string literal results
>>>> in unspecified behavior
>>>> src/mod_cband.c:1054: warning: comparison with string literal results
>>>> in unspecified behavior
>>>> src/mod_cband.c:1058: warning: comparison with string literal results
>>>> in unspecified behavior
>>>> src/mod_cband.c:1058: warning: comparison with string literal results
>>>> in unspecified behavior
>>>> src/mod_cband.c: In function 'mod_cband_get_dst':
>>>> src/mod_cband.c:1333: error: 'conn_rec' has no member named 'remote_ip'
>>>> src/mod_cband.c: In function 'mod_cband_get_remote_host':
>>>> src/mod_cband.c:1362: error: 'struct conn_rec' has no member named
>>>> 'remote_ip'
>>>> src/mod_cband.c:1363: error: 'struct conn_rec' has no member named
>>>> 'remote_ip'
>>>> src/mod_cband.c:1365: error: 'struct conn_rec' has no member named
>>>> 'remote_addr'
>>>> apxs:Error: Command failed with rc=65536
>>>>
>>>
>>> Apache 2.4 splits the "remote_ip" into a client IP (TCP peer) and a
>>> useragent_ip (e.g. X-Forwarded-For)
>>>
>>> Arbitrarily choosing the former for mod_cband lets it build:
>>>
>>> http://apache.pastebin.ca/2120923
>>> http://httpd.apache.org/docs/2.4/developer/new_api_2_4.html
>>
>> ... and for very simple tasks you might want to have a look at
>> mod_ratelimit, which is bundled with 2.4. Improvements welcome ;)
>
> Would be fantastic if it did similar to cband though, we really only
> use it for quota limits on hosts, any future plans?

Not yet, it might be driven by contributions :)

Note that the bandwidth limit enforced by mod_ratelimit isn't configured 
as a hard limit, but can be set as an Apache environment variable. That 
means it is very flexible. You can set it individually for VHosts or 
Locations/Diroetories or even using mod_rewrite depending on request 
attributes.

Disclaimer: Haven't used it yet myself, just judging from looking at the 
code and docs.

Regards,

Rainer

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message