调查Apache Web服务器

调查Apache Web服务器


如果你在网上购买了一台VPS或专用服务器,通常服务提供商都已经在上面安装了Web服务器软件,在大多数情况下,该服务器软件会是Apache httpd Web服务器。如果你正接手诊断一台Apache Web服务器的问题......这时候你最需要知道的,是Web服务器软件的版本及运行时信息。使用如下命令可以获取你想要的信息。


1、服务器的版本:

# httpd -v
样例输出:

	Server version: Apache/2.2.3

	Server built:   Oct 28 2008 07:22:45
2、哪些模块在编译时被编译进了该服务器
# httpd -l
3、服务器在运行时已加载的静态和动态模块
# httpd -M
样例输出:
	Loaded Modules:

	 core_module (static)

	 mpm_prefork_module (static)

	 http_module (static)

	 so_module (static)

	 auth_basic_module (shared)

	 auth_digest_module (shared)

	 authn_file_module (shared)

	 authn_alias_module (shared)

	 authn_anon_module (shared)

	 authn_dbm_module (shared)

	 authn_default_module (shared)

	 authz_host_module (shared)

	 authz_user_module (shared)

	 authz_owner_module (shared)

	 authz_groupfile_module (shared)

	 authz_dbm_module (shared)

	 authz_default_module (shared)

	 ldap_module (shared)

	 authnz_ldap_module (shared)

	 include_module (shared)

	 log_config_module (shared)

	 logio_module (shared)

	 env_module (shared)

	 ext_filter_module (shared)

	 mime_magic_module (shared)

	 expires_module (shared)

	 deflate_module (shared)

	 headers_module (shared)

	 usertrack_module (shared)

	 setenvif_module (shared)

	 mime_module (shared)

	 dav_module (shared)

	 status_module (shared)

	 autoindex_module (shared)

	 info_module (shared)

	 dav_fs_module (shared)

	 vhost_alias_module (shared)

	 negotiation_module (shared)

	 dir_module (shared)

	 actions_module (shared)

	 speling_module (shared)

	 userdir_module (shared)

	 alias_module (shared)

	 rewrite_module (shared)

	 proxy_module (shared)

	 proxy_balancer_module (shared)

	 proxy_ftp_module (shared)

	 proxy_http_module (shared)

	 proxy_connect_module (shared)

	 cache_module (shared)

	 suexec_module (shared)

	 disk_cache_module (shared)

	 file_cache_module (shared)

	 mem_cache_module (shared)

	 cgi_module (shared)

	 version_module (shared)

	 chroot_module (shared)

	 perl_module (shared)

	 php5_module (shared)

	 proxy_ajp_module (shared)

	 python_module (shared)

	Syntax OK
4、服务器版本及编译时的编译参数
# httpd -V
样例输出:
	Server version: Apache/2.2.3

	Server built:   Oct 28 2008 07:22:45

	Server's Module Magic Number: 20051115:3

	Server loaded:  APR 1.2.7, APR-Util 1.2.7

	Compiled using: APR 1.2.7, APR-Util 1.2.7

	Architecture:   64-bit

	Server MPM:     Prefork

	  threaded:     no

	    forked:     yes (variable process count)

	Server compiled with....

	 -D APACHE_MPM_DIR="server/mpm/prefork"

	 -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=128

	 -D HTTPD_ROOT="/etc/httpd"

	 -D SUEXEC_BIN="/usr/sbin/suexec"

	 -D DEFAULT_PIDLOG="logs/httpd.pid"

	 -D DEFAULT_SCOREBOARD="logs/apache_runtime_status"

	 -D DEFAULT_LOCKFILE="logs/accept.lock"

	 -D DEFAULT_ERRORLOG="logs/error_log"

	 -D AP_TYPES_CONFIG_FILE="conf/mime.types"

	 -D SERVER_CONFIG_FILE="conf/httpd.conf"

	 

	 
5、如果你对httpd.conf配置文件做了修改,应该对你的修改做语法的正确性检查:
# httpd -t

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值