작은숲:위키노트/아파치 적재된 모듈 확인
아파치에는 정적 모듈(Static modules)과 동적 모듈(동적 공유 객체, Dynamic Shared Objects, DSO)이 있다.
버전 확인
현재 설치된 아파치 서버의 버전을 확인한다. 간단히 버전만 확인할 수도 있고, 상세한 정보를 확인할 수도 있다.
# /usr/local/apache/bin/httpd -v
Server version: Apache/2.4.3 (Unix)
Server built: Jun 25 2014 17:16:43
# /usr/local/apache/bin/httpd -V
Server version: Apache/2.4.3 (Unix)
Server built: Jun 25 2014 17:16:43
Server's Module Magic Number: 20120211:6
Server loaded: APR 1.4.6, APR-UTIL 1.4.1
Compiled using: APR 1.4.6, APR-UTIL 1.4.1
Architecture: 64-bit
Server MPM: event
threaded: yes (fixed thread count)
forked: yes (variable process count)
Server compiled with....
-D APR_HAS_SENDFILE
-D APR_HAS_MMAP
-D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
-D APR_USE_SYSVSEM_SERIALIZE
-D APR_USE_PTHREAD_SERIALIZE
-D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
-D APR_HAS_OTHER_CHILD
-D AP_HAVE_RELIABLE_PIPED_LOGS
-D DYNAMIC_MODULE_LIMIT=256
-D HTTPD_ROOT="/usr/local/apache"
-D SUEXEC_BIN="/usr/local/apache/bin/suexec"
-D DEFAULT_PIDLOG="logs/httpd.pid"
-D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
-D DEFAULT_ERRORLOG="logs/error_log"
-D AP_TYPES_CONFIG_FILE="conf/mime.types"
-D SERVER_CONFIG_FILE="conf/httpd.conf"
정적 모듈
정적 모듈은 컴파일할 때 포함시켜서 컴파일하는 모듈들을 말한다. 이 모듈들을 확인할 때는 -l 옵션을 사용한다.
# /usr/local/apache/bin/httpd -l
Compiled in modules:
core.c
mod_so.c
http_core.c
event.c
동적 모듈
동적 공유 객체(Dynamic Shared Objects, DSO), 간단히 동적 모듈은 httpd.conf에서 LoadModule 지시자를 써서 적재한다. 아파치를 처음 설치하면 기본적인 모듈들만 적재되니 확인 후에 필요한 모듈은 주석을 해제해 적재해야 한다.
# /usr/local/apache/bin/httpd -D DUMP_MODULES
Loaded Modules:
core_module (static)
so_module (static)
http_module (static)
mpm_event_module (static)
authn_file_module (shared)
authn_core_module (shared)
authz_host_module (shared)
authz_groupfile_module (shared)
authz_user_module (shared)
authz_core_module (shared)
access_compat_module (shared)
auth_basic_module (shared)
cache_module (shared)
cache_disk_module (shared)
socache_shmcb_module (shared)
reqtimeout_module (shared)
ext_filter_module (shared)
filter_module (shared)
deflate_module (shared)
mime_module (shared)
log_config_module (shared)
env_module (shared)
expires_module (shared)
headers_module (shared)
setenvif_module (shared)
version_module (shared)
ssl_module (shared)
unixd_module (shared)
status_module (shared)
autoindex_module (shared)
vhost_alias_module (shared)
negotiation_module (shared)
dir_module (shared)
alias_module (shared)
rewrite_module (shared)
php5_module (shared)
cband_module (shared)
perl_module (shared)
위에서 뒤에 (static)이 붙은 모듈은 정적 모듈이고, (shared)가 붙은 모듈이 DSO, 동적 모듈이다.