Apache 无法启动,没有错误消息

Apache 无法启动,没有错误消息

Apache 无法在我们的生产服务器上启动(突然),并且没有错误消息。有人能帮我修复这个问题或帮我开始调试吗?

init.d 失败:

/etc/init.d/httpd restart
Stopping httpd:                                            [FAILED]
Starting httpd:                                            [FAILED]

配置测试

Syntax OK

阿帕奇:

Server version: Apache/2.2.3
Server built:   Nov 12 2012 08:48:46

服务器:

CentOS release 5.8 (Final)

带调试的启动:

/usr/sbin/httpd -e debug -X
[Sun Dec 16 20:10:16 2012] [debug] mod_so.c(246): loaded module auth_basic_module
[Sun Dec 16 20:10:16 2012] [debug] mod_so.c(246): loaded module auth_digest_module
[Sun Dec 16 20:10:16 2012] [debug] mod_so.c(246): loaded module authn_file_module
[Sun Dec 16 20:10:16 2012] [debug] mod_so.c(246): loaded module authn_alias_module
[Sun Dec 16 20:10:16 2012] [debug] mod_so.c(246): loaded module authn_anon_module
[Sun Dec 16 20:10:16 2012] [debug] mod_so.c(246): loaded module authn_dbm_module
[Sun Dec 16 20:10:16 2012] [debug] mod_so.c(246): loaded module authn_default_module
[Sun Dec 16 20:10:16 2012] [debug] mod_so.c(246): loaded module authz_host_module
[Sun Dec 16 20:10:16 2012] [debug] mod_so.c(246): loaded module authz_user_module
[Sun Dec 16 20:10:16 2012] [debug] mod_so.c(246): loaded module authz_owner_module
[Sun Dec 16 20:10:16 2012] [debug] mod_so.c(246): loaded module authz_groupfile_module
[Sun Dec 16 20:10:16 2012] [debug] mod_so.c(246): loaded module authz_dbm_module
[Sun Dec 16 20:10:16 2012] [debug] mod_so.c(246): loaded module authz_default_module
[Sun Dec 16 20:10:16 2012] [debug] mod_so.c(246): loaded module ldap_module
[Sun Dec 16 20:10:16 2012] [debug] mod_so.c(246): loaded module authnz_ldap_module
[Sun Dec 16 20:10:16 2012] [debug] mod_so.c(246): loaded module include_module
[Sun Dec 16 20:10:16 2012] [debug] mod_so.c(246): loaded module log_config_module
[Sun Dec 16 20:10:16 2012] [debug] mod_so.c(246): loaded module logio_module
[Sun Dec 16 20:10:16 2012] [debug] mod_so.c(246): loaded module env_module
[Sun Dec 16 20:10:16 2012] [debug] mod_so.c(246): loaded module ext_filter_module
[Sun Dec 16 20:10:16 2012] [debug] mod_so.c(246): loaded module mime_magic_module
[Sun Dec 16 20:10:16 2012] [debug] mod_so.c(246): loaded module expires_module
[Sun Dec 16 20:10:16 2012] [debug] mod_so.c(246): loaded module deflate_module
[Sun Dec 16 20:10:16 2012] [debug] mod_so.c(246): loaded module headers_module
[Sun Dec 16 20:10:16 2012] [debug] mod_so.c(246): loaded module usertrack_module
[Sun Dec 16 20:10:16 2012] [debug] mod_so.c(246): loaded module setenvif_module
[Sun Dec 16 20:10:16 2012] [debug] mod_so.c(246): loaded module mime_module
[Sun Dec 16 20:10:16 2012] [debug] mod_so.c(246): loaded module dav_module
[Sun Dec 16 20:10:16 2012] [debug] mod_so.c(246): loaded module status_module
[Sun Dec 16 20:10:16 2012] [debug] mod_so.c(246): loaded module autoindex_module
[Sun Dec 16 20:10:16 2012] [debug] mod_so.c(246): loaded module info_module
[Sun Dec 16 20:10:16 2012] [debug] mod_so.c(246): loaded module dav_fs_module
[Sun Dec 16 20:10:16 2012] [debug] mod_so.c(246): loaded module vhost_alias_module
[Sun Dec 16 20:10:16 2012] [debug] mod_so.c(246): loaded module negotiation_module
[Sun Dec 16 20:10:16 2012] [debug] mod_so.c(246): loaded module dir_module
[Sun Dec 16 20:10:16 2012] [debug] mod_so.c(246): loaded module actions_module
[Sun Dec 16 20:10:16 2012] [debug] mod_so.c(246): loaded module speling_module
[Sun Dec 16 20:10:16 2012] [debug] mod_so.c(246): loaded module userdir_module
[Sun Dec 16 20:10:16 2012] [debug] mod_so.c(246): loaded module alias_module
[Sun Dec 16 20:10:16 2012] [debug] mod_so.c(246): loaded module rewrite_module
[Sun Dec 16 20:10:16 2012] [debug] mod_so.c(246): loaded module proxy_module
[Sun Dec 16 20:10:16 2012] [debug] mod_so.c(246): loaded module proxy_balancer_module
[Sun Dec 16 20:10:16 2012] [debug] mod_so.c(246): loaded module proxy_ftp_module
[Sun Dec 16 20:10:16 2012] [debug] mod_so.c(246): loaded module proxy_http_module
[Sun Dec 16 20:10:16 2012] [debug] mod_so.c(246): loaded module proxy_connect_module
[Sun Dec 16 20:10:16 2012] [debug] mod_so.c(246): loaded module cache_module
[Sun Dec 16 20:10:16 2012] [debug] mod_so.c(246): loaded module suexec_module
[Sun Dec 16 20:10:16 2012] [debug] mod_so.c(246): loaded module disk_cache_module
[Sun Dec 16 20:10:16 2012] [debug] mod_so.c(246): loaded module file_cache_module
[Sun Dec 16 20:10:16 2012] [debug] mod_so.c(246): loaded module mem_cache_module
[Sun Dec 16 20:10:16 2012] [debug] mod_so.c(246): loaded module cgi_module
[Sun Dec 16 20:10:16 2012] [debug] mod_so.c(246): loaded module version_module
[Sun Dec 16 20:10:16 2012] [debug] mod_so.c(246): loaded module ssl_module
[Sun Dec 16 20:10:16 2012] [debug] mod_so.c(246): loaded module perl_module
[Sun Dec 16 20:10:16 2012] [debug] mod_so.c(246): loaded module php5_module
[Sun Dec 16 20:10:16 2012] [debug] mod_so.c(246): loaded module proxy_ajp_module
<At this point it exits>

/var/log/httpd/error_log

[Sun Dec 16 20:10:16 2012] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Sun Dec 16 20:10:16 2012] [info] Init: Seeding PRNG with 256 bytes of entropy
[Sun Dec 16 20:10:16 2012] [info] Init: Generating temporary RSA private keys (512/1024 bits)
[Sun Dec 16 20:10:16 2012] [info] Init: Generating temporary DH parameters (512/1024 bits)
[Sun Dec 16 20:10:16 2012] [info] Init: Initializing (virtual) servers for SSL

答案1

SSL 问题很可能是静默失败的原因。如果没有日志信息,我会反向操作。如果您在 conf.d 中保留服务器特定的配置,我会将它们全部移出,启动它,然后逐一添加回来。或者,根据您的配置有多大,我会注释掉某些内容,启动它,然后取消注释,直到它无法启动。

答案2

备份您的 apche conf 文件,然后使用 Listen Directive 创建一个新 httpd.conf 文件,看看是否有帮助。一些时间模块(如 Suexec 和 Proxy)会导致问题。如果 apache 使用 Listen Directive 启动,则禁用 suexec 和 porxy 模块,并检查这是否有帮助。

相关内容