mod_throttle 는 아파치 2. 대에서 컴파일 안되나요?
글쓴이: cohuman1 / 작성시간: 금, 2003/10/24 - 11:48오전
레드햇 9 하고 아파치 버전은 2. 대 입니다.
DSO 모듈로 설치를 해야되서 간단히 컴파일만 하고
mod_throttle.so 적재만 해주면 되는것으로 알고 있는데요.
컴파일부터 안됩니다.
위 프로그램 홈페이지에 보니 아파치 1. 대에서 테스트가 이루어졌는데
아파치 2. 대에서는 안되는가요?
아래는 에러메세지 입니다.
Quote:
[root@linuxblue mod_throttle-3.1.2]# make install
/usr/local/apache/bin/apxs -c mod_throttle.c
/usr/local/apache/build/libtool --silent --mode=compile gcc -prefer-pic -DAP_HAVE_DESIGNATED_INITIALIZER -DLINUX=2 -D_REENTRANT -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -D_SVID_SOURCE -D_GNU_SOURCE -g -O2 -pthread -I/usr/local/apache/include -I/usr/local/apache/include -I/usr/local/apache/include -c -o mod_throttle.lo mod_throttle.c && touch mod_throttle.slo
mod_throttle.c:51: parse error before "THROTTLE_CLIENT_IP"
In file included from /usr/include/bits/types.h:31,
from /usr/include/sys/types.h:31,
from mod_throttle.c:135:
/usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h:213: syntax error before "typedef"
mod_throttle.c:152:31: http_conf_globals.h: No such file or directory
mod_throttle.c:165: parse error before "throttle_module"
mod_throttle.c:165: warning: data definition has no type or storage class
mod_throttle.c:316: warning: `struct pool' declared inside parameter list
mod_throttle.c:316: warning: its scope is only this definition or declaration, which is probably not what you want
mod_throttle.c:317: warning: `struct pool' declared inside parameter list
mod_throttle.c:323: parse error before "pool"
mod_throttle.c:324: warning: `struct pool' declared inside parameter list
mod_throttle.c:335: parse error before '*' token
mod_throttle.c:387: parse error before '*' token
mod_throttle.c: In function `byte_size':
mod_throttle.c:395: `size' undeclared (first use in this function)
mod_throttle.c:395: (Each undeclared identifier is reported only once
mod_throttle.c:395: for each function it appears in.)
mod_throttle.c:404: `p' undeclared (first use in this function)
mod_throttle.c:404: warning: return makes pointer from integer without a cast
mod_throttle.c: At top level:
mod_throttle.c:408: parse error before '*' token
mod_throttle.c: In function `time_period':
mod_throttle.c:412: `period' undeclared (first use in this function)
mod_throttle.c:425: `p' undeclared (first use in this function)
mod_throttle.c:425: warning: return makes pointer from integer without a cast
mod_throttle.c: At top level:
mod_throttle.c:429: parse error before '*' token
mod_throttle.c: In function `elapsed_time':
mod_throttle.c:434: `s' undeclared (first use in this function)
mod_throttle.c:444: `p' undeclared (first use in this function)
mod_throttle.c:444: warning: return makes pointer from integer without a cast
mod_throttle.c:446: warning: return makes pointer from integer without a cast
mod_throttle.c:448: warning: return makes pointer from integer without a cast
mod_throttle.c:450: warning: return makes pointer from integer without a cast
mod_throttle.c: At top level:
mod_throttle.c:850: conflicting types for `t_critical'
mod_throttle.c:322: previous declaration of `t_critical'
mod_throttle.c:852: conflicting types for `critical'
mod_throttle.c:328: previous declaration of `critical'
mod_throttle.c:855: parse error before "pool"
mod_throttle.c:861: warning: `struct pool' declared inside parameter list
mod_throttle.c:862: conflicting types for `critical_create'
mod_throttle.c:324: previous declaration of `critical_create'
mod_throttle.c:869: conflicting types for `critical_acquire'
mod_throttle.c:325: previous declaration of `critical_acquire'
mod_throttle.c:875: conflicting types for `critical_release'
mod_throttle.c:326: previous declaration of `critical_release'
mod_throttle.c:994: parse error before '*' token
mod_throttle.c: In function `sm_pool_create':
mod_throttle.c:1001: `p' undeclared (first use in this function)
mod_throttle.c:1003: `size' undeclared (first use in this function)
mod_throttle.c:1007: warning: passing arg 4 of `ap_log_error' makes integer from pointer without a cast
mod_throttle.c:1007: warning: passing arg 5 of `ap_log_error' from incompatible pointer type
mod_throttle.c:1007: too few arguments to function `ap_log_error'
mod_throttle.c:1014: warning: passing arg 4 of `ap_log_error' makes integer from pointer without a cast
mod_throttle.c:1014: warning: passing arg 5 of `ap_log_error' from incompatible pointer type
mod_throttle.c:1014: warning: passing arg 6 of `ap_log_error' makes pointer from integer without a cast
mod_throttle.c:1040: warning: passing arg 4 of `ap_log_error' makes integer from pointer without a cast
mod_throttle.c:1040: warning: passing arg 5 of `ap_log_error' from incompatible pointer type
mod_throttle.c:1040: warning: passing arg 6 of `ap_log_error' makes pointer from integer without a cast
mod_throttle.c:1045: warning: passing arg 4 of `ap_log_error' makes integer from pointer without a cast
mod_throttle.c:1045: warning: passing arg 5 of `ap_log_error' from incompatible pointer type
mod_throttle.c:1045: warning: passing arg 6 of `ap_log_error' makes pointer from integer without a cast
mod_throttle.c:1047: `ap_user_id' undeclared (first use in this function)
mod_throttle.c:1048: `ap_group_id' undeclared (first use in this function)
mod_throttle.c:1054: warning: passing arg 4 of `ap_log_error' makes integer from pointer without a cast
mod_throttle.c:1054: warning: passing arg 5 of `ap_log_error' from incompatible pointer type
mod_throttle.c:1054: warning: passing arg 6 of `ap_log_error' makes pointer from integer without a cast
mod_throttle.c:1064: warning: passing arg 4 of `ap_log_error' makes integer from pointer without a cast
mod_throttle.c:1064: warning: passing arg 5 of `ap_log_error' from incompatible pointer type
mod_throttle.c:1064: warning: passing arg 6 of `ap_log_error' makes pointer from integer without a cast
mod_throttle.c:1087: `ap_null_cleanup' undeclared (first use in this function)
mod_throttle.c: At top level:
mod_throttle.c:1271: warning: `struct pool' declared inside parameter list
mod_throttle.c: In function `create_dir_config':
mod_throttle.c:1275: warning: assignment makes pointer from integer without a cast
mod_throttle.c: At top level:
mod_throttle.c:1296: warning: `struct pool' declared inside parameter list
mod_throttle.c: In function `cleanup_module':
mod_throttle.c:1331: warning: passing arg 1 of `cmd_preserve' from incompatible pointer type
mod_throttle.c: At top level:
mod_throttle.c:1335: warning: `struct pool' declared inside parameter list
mod_throttle.c: In function `init_module':
mod_throttle.c:1342: request for member `module_index' in something not a structure or union
mod_throttle.c:1482: warning: passing arg 1 of `critical_create' from incompatible pointer type
mod_throttle.c:1484: warning: passing arg 1 of `ap_add_version_component' from incompatible pointer type
mod_throttle.c:1484: too few arguments to function `ap_add_version_component'
mod_throttle.c:1486: warning: passing arg 1 of `cmd_restore' from incompatible pointer type
mod_throttle.c:1490: warning: passing arg 4 of `ap_log_error' makes integer from pointer without a cast
mod_throttle.c:1490: warning: passing arg 5 of `ap_log_error' from incompatible pointer type
mod_throttle.c:1498: `ap_null_cleanup' undeclared (first use in this function)
mod_throttle.c: At top level:
mod_throttle.c:1502: parse error before "pool"
mod_throttle.c: In function `child_init':
mod_throttle.c:1504: `s' undeclared (first use in this function)
mod_throttle.c:1504: `p' undeclared (first use in this function)
mod_throttle.c: At top level:
mod_throttle.c:1512: warning: `struct pool' declared inside parameter list
mod_throttle.c:1513: conflicting types for `cmd_preserve'
mod_throttle.c:316: previous declaration of `cmd_preserve'
mod_throttle.c: In function `cmd_preserve':
mod_throttle.c:1521: warning: passing arg 1 of `ap_server_root_relative' from incompatible pointer type
mod_throttle.c:1522: warning: assignment makes pointer from integer without a cast
mod_throttle.c:1597: `ap_user_id' undeclared (first use in this function)
mod_throttle.c:1597: `ap_group_id' undeclared (first use in this function)
mod_throttle.c: At top level:
mod_throttle.c:1607: warning: `struct pool' declared inside parameter list
mod_throttle.c:1608: conflicting types for `cmd_restore'
mod_throttle.c:317: previous declaration of `cmd_restore'
mod_throttle.c: In function `cmd_restore':
mod_throttle.c:1615: warning: assignment makes pointer from integer without a cast
mod_throttle.c:1616: warning: passing arg 1 of `ap_server_root_relative' from incompatible pointer type
mod_throttle.c:1617: warning: assignment makes pointer from integer without a cast
mod_throttle.c:1626: warning: assignment makes pointer from integer without a cast
mod_throttle.c:1627: warning: assignment makes pointer from integer without a cast
mod_throttle.c: At top level:
mod_throttle.c:1740: parse error before '*' token
mod_throttle.c: In function `set_policy3':
mod_throttle.c:1745: `policy' undeclared (first use in this function)
mod_throttle.c:1752: `config' undeclared (first use in this function)
mod_throttle.c:1754: `limit' undeclared (first use in this function)
mod_throttle.c:1778: `period' undeclared (first use in this function)
mod_throttle.c: At top level:
mod_throttle.c:1811: parse error before '*' token
mod_throttle.c: In function `set_policy':
mod_throttle.c:1815: `config' undeclared (first use in this function)
mod_throttle.c:1819: `p' undeclared (first use in this function)
mod_throttle.c:1819: `args' undeclared (first use in this function)
mod_throttle.c: In function `throttle_single_user':
mod_throttle.c:1884: warning: passing arg 1 of `create_dir_config' from incompatible pointer type
mod_throttle.c: In function `throttle_user':
mod_throttle.c:1939: warning: passing arg 1 of `ap_os_is_path_absolute' from incompatible pointer type
mod_throttle.c:1939: too few arguments to function `ap_os_is_path_absolute'
mod_throttle.c:1942: warning: assignment makes pointer from integer without a cast
mod_throttle.c:1949: warning: assignment makes pointer from integer without a cast
mod_throttle.c:1950: warning: assignment makes pointer from integer without a cast
mod_throttle.c: In function `throttle_runtime_file':
mod_throttle.c:2039: warning: assignment makes pointer from integer without a cast
mod_throttle.c: In function `throttle_lock_file':
mod_throttle.c:2052: warning: assignment makes pointer from integer without a cast
mod_throttle.c: In function `policy_over_limit':
mod_throttle.c:2219: warning: passing arg 4 of `ap_log_rerror' makes integer from pointer without a cast
mod_throttle.c:2219: warning: passing arg 5 of `ap_log_rerror' from incompatible pointer type
mod_throttle.c: In function `policy_document':
mod_throttle.c:2354: too few arguments to function `ap_sub_req_lookup_uri'
mod_throttle.c:2372: warning: passing arg 4 of `ap_log_rerror' makes integer from pointer without a cast
mod_throttle.c:2372: warning: passing arg 5 of `ap_log_rerror' from incompatible pointer type
mod_throttle.c: In function `policy_idle':
mod_throttle.c:2490: warning: passing arg 4 of `ap_log_rerror' makes integer from pointer without a cast
mod_throttle.c:2490: warning: passing arg 5 of `ap_log_rerror' from incompatible pointer type
mod_throttle.c: In function `policy_speed':
mod_throttle.c:2565: warning: passing arg 4 of `ap_log_rerror' makes integer from pointer without a cast
mod_throttle.c:2565: warning: passing arg 5 of `ap_log_rerror' from incompatible pointer type
mod_throttle.c: In function `is_request_for_file':
mod_throttle.c:2701: warning: initialization makes pointer from integer without a cast
mod_throttle.c:2702: warning: initialization makes pointer from integer without a cast
mod_throttle.c:2705: structure has no member named `st_mode'
mod_throttle.c:2705: structure has no member named `st_mode'
mod_throttle.c: In function `uri_handler':
mod_throttle.c:2739: too few arguments to function `ap_sub_req_lookup_uri'
mod_throttle.c: In function `access_handler':
mod_throttle.c:2840: warning: comparison between pointer and integer
mod_throttle.c: In function `authentication_handler':
mod_throttle.c:2853: warning: comparison between pointer and integer
mod_throttle.c: In function `authorization_handler':
mod_throttle.c:2920: warning: comparison between pointer and integer
mod_throttle.c: In function `get_config_by_dir':
mod_throttle.c:2958: request for member `module_index' in something not a structure or union
mod_throttle.c: In function `mime_handler':
mod_throttle.c:2978: warning: comparison between pointer and integer
mod_throttle.c:2983: warning: assignment makes pointer from integer without a cast
mod_throttle.c:2986: warning: assignment makes pointer from integer without a cast
mod_throttle.c:3001: structure has no member named `st_uid'
mod_throttle.c:3016: warning: comparison between pointer and integer
mod_throttle.c:3017: structure has no member named `st_size'
mod_throttle.c: In function `fixup_handler':
mod_throttle.c:3042: warning: comparison between pointer and integer
mod_throttle.c:3051: warning: assignment makes pointer from integer without a cast
mod_throttle.c:3100: warning: passing arg 1 of `cmd_preserve' from incompatible pointer type
mod_throttle.c:3102: warning: passing arg 1 of `cmd_restore' from incompatible pointer type
mod_throttle.c:3128: warning: assignment makes pointer from integer without a cast
mod_throttle.c: In function `log_handler':
mod_throttle.c:3155: warning: comparison between pointer and integer
mod_throttle.c:3181: structure has no member named `st_uid'
mod_throttle.c:3202: warning: comparison between pointer and integer
mod_throttle.c:3213: warning: comparison between pointer and integer
mod_throttle.c: In function `status_html_header':
mod_throttle.c:3276: warning: assignment makes pointer from integer without a cast
mod_throttle.c:3293: `ap_restart_time' undeclared (first use in this function)
mod_throttle.c: In function `status_html_line':
mod_throttle.c:3372: warning: assignment makes pointer from integer without a cast
mod_throttle.c:3379: warning: passing arg 1 of `ap_os_is_path_absolute' from incompatible pointer type
mod_throttle.c:3379: too few arguments to function `ap_os_is_path_absolute'
mod_throttle.c:3382: warning: assignment makes pointer from integer without a cast
mod_throttle.c: At top level:
mod_throttle.c:3871: parse error before "content_handlers"
mod_throttle.c:3872: warning: braces around scalar initializer
mod_throttle.c:3872: warning: (near initialization for `content_handlers[0]')
mod_throttle.c:3872: warning: initialization makes integer from pointer without a cast
mod_throttle.c:3872: warning: excess elements in scalar initializer
mod_throttle.c:3872: warning: (near initialization for `content_handlers[0]')
mod_throttle.c:3873: warning: braces around scalar initializer
mod_throttle.c:3873: warning: (near initialization for `content_handlers[1]')
mod_throttle.c:3873: warning: initialization makes integer from pointer without a cast
mod_throttle.c:3873: warning: excess elements in scalar initializer
mod_throttle.c:3873: warning: (near initialization for `content_handlers[1]')
mod_throttle.c:3874: warning: braces around scalar initializer
mod_throttle.c:3874: warning: (near initialization for `content_handlers[2]')
mod_throttle.c:3874: warning: initialization makes integer from pointer without a cast
mod_throttle.c:3874: warning: excess elements in scalar initializer
mod_throttle.c:3874: warning: (near initialization for `content_handlers[2]')
mod_throttle.c:3881: warning: braces around scalar initializer
mod_throttle.c:3881: warning: (near initialization for `content_handlers[3]')
mod_throttle.c:3881: warning: initialization makes integer from pointer without a cast
mod_throttle.c:3882: warning: data definition has no type or storage class
mod_throttle.c:3889: warning: initialization from incompatible pointer type
mod_throttle.c:3892: warning: initialization from incompatible pointer type
mod_throttle.c:3895: warning: initialization from incompatible pointer type
mod_throttle.c:3898: warning: initialization from incompatible pointer type
mod_throttle.c:3901: warning: initialization from incompatible pointer type
mod_throttle.c:3904: warning: initialization from incompatible pointer type
mod_throttle.c:3911: warning: initialization from incompatible pointer type
mod_throttle.c:3914: warning: initialization from incompatible pointer type
mod_throttle.c:3920: parse error before "throttle_module"
mod_throttle.c:3921: `this_module_needs_to_be_ported_to_apache_2_0' undeclared here (not in a function)
mod_throttle.c:3921: initializer element is not constant
mod_throttle.c:3921: (near initialization for `throttle_module')
mod_throttle.c:3922: warning: excess elements in scalar initializer
mod_throttle.c:3922: warning: (near initialization for `throttle_module')
mod_throttle.c:3923: warning: excess elements in scalar initializer
mod_throttle.c:3923: warning: (near initialization for `throttle_module')
mod_throttle.c:3924: warning: excess elements in scalar initializer
mod_throttle.c:3924: warning: (near initialization for `throttle_module')
mod_throttle.c:3925: warning: excess elements in scalar initializer
mod_throttle.c:3925: warning: (near initialization for `throttle_module')
mod_throttle.c:3926: warning: excess elements in scalar initializer
mod_throttle.c:3926: warning: (near initialization for `throttle_module')
mod_throttle.c:3927: warning: excess elements in scalar initializer
mod_throttle.c:3927: warning: (near initialization for `throttle_module')
mod_throttle.c:3928: warning: excess elements in scalar initializer
mod_throttle.c:3928: warning: (near initialization for `throttle_module')
mod_throttle.c:3929: warning: excess elements in scalar initializer
mod_throttle.c:3929: warning: (near initialization for `throttle_module')
mod_throttle.c:3930: warning: excess elements in scalar initializer
mod_throttle.c:3930: warning: (near initialization for `throttle_module')
mod_throttle.c:3931: warning: excess elements in scalar initializer
mod_throttle.c:3931: warning: (near initialization for `throttle_module')
mod_throttle.c:3932: warning: excess elements in scalar initializer
mod_throttle.c:3932: warning: (near initialization for `throttle_module')
mod_throttle.c:3933: warning: excess elements in scalar initializer
mod_throttle.c:3933: warning: (near initialization for `throttle_module')
mod_throttle.c:3934: warning: excess elements in scalar initializer
mod_throttle.c:3934: warning: (near initialization for `throttle_module')
mod_throttle.c:3935: warning: excess elements in scalar initializer
mod_throttle.c:3935: warning: (near initialization for `throttle_module')
mod_throttle.c:3937: warning: excess elements in scalar initializer
mod_throttle.c:3937: warning: (near initialization for `throttle_module')
mod_throttle.c:3940: warning: excess elements in scalar initializer
mod_throttle.c:3940: warning: (near initialization for `throttle_module')
mod_throttle.c:3943: warning: excess elements in scalar initializer
mod_throttle.c:3943: warning: (near initialization for `throttle_module')
mod_throttle.c:3948: warning: excess elements in scalar initializer
mod_throttle.c:3948: warning: (near initialization for `throttle_module')
mod_throttle.c:3948: warning: data definition has no type or storage class
apxs:Error: Command failed with rc=65536
.
make: *** [mod_throttle.so] 오류 1
Forums:
http://www.snert.com/Software/mod_thrott
http://www.snert.com/Software/mod_throttle/index.shtml 에서는 이렇게 적혀 있네요
Bandwidth & Request Throttling for Apache 1.3
냥... 음음... 제작자 홈에서는 못 찾겠네요 :)
http://www.snert.com/Software/index.html
------------------
나는 바보
아파치 2.x 을 삭제하고아파치 1.3.28 을 다시 설치해서 mod
아파치 2.x 을 삭제하고
아파치 1.3.28 을 다시 설치해서 mod_throttle 를 설치하니깐 되네요.
아파치 2. 대에서는 안되는건지...
아직 초보라서 질문조차도 엉성할 수 있습니다.
이해하시구요.^^.
제 글을 읽어주시는 분들, 답변해주시는 분들께 항상 감사드립니다.
[quote]Apache 2.0에서 서버 API가 많이 변경되었다. Ap
http://httpd.apache.org/docs-2.0/upgrading.html 에 나와 있는
문구 입니다.
아직 2.0버전용 모듈을 안 만들었나 보네요.
직접 모듈을 수정하거나, 2.0모듈이 나오기를 기다려야 겠네요..
근데...
mod_throttle 이 어떤 모듈이죠?
답변감사하구요.. 영어권에서 태어났으면 컴공부하기 더 쉬웠을텐데..;;
답변감사하구요.. 영어권에서 태어났으면 컴공부하기 더 쉬웠을텐데..;;
mod_throttle 모듈은 트래픽 제한을 해주는 거에요.
보통 웹호스팅 업체에서 많이 쓰던데.
웹호스팅 사용자들이 하루 트래픽 1G 또는 2G 등등을 넘지 못하게 제한을 해줄수 있습니다.
초과하면 하루 주어진 트래픽을 다 쓰버렷다는 메시지를 보여주고
그날은 더 이상 접속이 안돼죠..;
mod_throttle 때문에 아파치 2.0.x 로 못 넘어가겠네요;;
아직 초보라서 질문조차도 엉성할 수 있습니다.
이해하시구요.^^.
제 글을 읽어주시는 분들, 답변해주시는 분들께 항상 감사드립니다.
음.. 제가 운영하는 서버에도 설치는 해 봤었는데 -_-;;구태여
음.. 제가 운영하는 서버에도 설치는 해 봤었는데 -_-;;
구태여 필요없어서 사용하지 않고 있는 모듈입니다. 냥..
mod_bandwidth도 있긴하지만 -_-;; 기능이 좀 다르죠? 냥냥
잘 설정하시면 1G 트래픽을 다 채우더라도 html 정도는 서비스가 가능하게 할수도 :)
------------------
나는 바보
궁금한게 있는데....mod_bandwidth에서 설정한
궁금한게 있는데....
mod_bandwidth에서
설정한 bandwidth대로 정확하게 속도가 제한되던가요??
저는 지정한 수치랑 차이가 많이 나서
여러 수치로 변경해보면서 원하는 정도를 조절하고 있습니다만.....
제가 뭘 잘못한건지 궁금해서요
댓글 달기