apache2.4.6整合限速模块mod_bw.c 报错处理

#tar -xvf mod_bw-0.92.tgz
#cd mod_bw

/usr/local/apache/bin/apxs -i -c -a mod_bw.c

apache2.4.2报错:

/mnt/vdd/mod_bw.c: In function 'get_bw_rate':
/mnt/vdd/mod_bw.c:567:59: error: 'conn_rec' has no member named 'remote_addr'
             if (apr_ipsubnet_test(e[i].x.ip, r->connection->remote_addr)) {

这个错误是由于apache2.2 到2.4 api有所改变,详细如下:

http://httpd.apache.org/docs/2.4/developer/new_api_2_4.html

解决办法:

vim mod_bw.c

把所有的remote_ipremote_addr分别替换成client_ipclient_addr

重新执行     /usr/local/apache/bin/apxs -i -c -a mod_bw.c 


你可能感兴趣的:(apache)