我上的是RHEL 6.5和Apache 2.2.15。当我restart httpd时,我不能再启动httpd了。在/var/log/httpd/error_log中显示以下内容:
[Fri Aug 01 18:31:48 2014] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Fri Aug 01 18:32:35 2014] [notice] SELinux policy enabled; httpd running as context unconfined_u:system_r:httpd_t:s0
[Fri Aug 01 18:32:35 2014] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Fri Aug 01 18:42:46 2014] [notice] SELinux policy enabled; httpd running as context system_u:system_r:httpd_t:s0
[Fri Aug 01 18:42:46 2014] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Fri Aug 01 18:43:15 2014] [notice] SELinux policy enabled; httpd running as context unconfined_u:system_r:httpd_t:s0
[Fri Aug 01 18:43:15 2014] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Fri Aug 01 18:43:59 2014] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Fri Aug 01 18:44:12 2014] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Fri Aug 01 18:45:03 2014] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)实际上,我已经disabled了SELinux并重新启动了。
我该怎么办?
发布于 2014-08-07 01:51:46
对不起,我已经找到原因了。这完全是因为SSL CERT问题。并不是因为上面的notices。
这与上面提到的信息无关。
因此,请不要理会他们。
我要做的是启用Apache详细日志,然后这才是真正的动作。它通过在启动Apache时显示mod_ssl模块加载时的故障来显示实际发生的情况。然后我意识到这是因为ssl.conf (或相应的Vhost文件)内部有SSL配置。
我犯了两个错误。首先,我没有给CERT相关文件(..crt/. .key/ .csr)授予读取权限。在那之后,更糟糕的是,其中一个文件出错了。
发布于 2016-03-09 19:07:12
Apache Error [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)一个晴朗的早晨,我发现我的Apache (httpd)服务已经关闭,无法启动:)
步骤1:检查httpd服务状态:
#/etc/init.d/httpd statushttpd死了,但是pid文件存在。
步骤2:搜索httpd进程并杀死这些进程
#ps -ef | grep httpd
# killall -9 httpd步骤3:如果存在则删除httpd锁文件
# rm -f /var/lock/subsys/httpdStep4:重新启动Apache/httpd服务
# service httpd restart
Stop httpd [FAILED]
Start httpd [FAILED]需要挖掘更多。
步骤5:检查httpd错误日志文件
# grep suexec /var/log/httpd/error_log
[Sun Sep 22 10:32:06 2013] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Sun Sep 22 10:33:51 2013] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Sun Sep 22 10:38:03 2013] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Sun Sep 22 10:45:53 2013] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)步骤6:检查httpd nss错误日志文件
#tail -300 /var/log/httpd/nss_error_log
[Sun Sep 22 04:03:27 2013] [error] Certificate not verified: 'Server-Cert'
[Sun Sep 22 04:03:27 2013] [error] SSL Library Error: -8181 Certificate has expired
[Sun Sep 22 04:03:27 2013] [error] Unable to verify certificate 'Server-Cert'. Add "NSSEnforceValidCerts off" to nss.conf so the server can start until the problem can be resolved.
[Sun Sep 22 10:38:03 2013] [error] Certificate not verified: 'Server-Cert'
[Sun Sep 22 10:38:03 2013] [error] SSL Library Error: -8181 Certificate has expired
[Sun Sep 22 10:38:03 2013] [error] Unable to verify certificate 'Server-Cert'. Add "NSSEnforceValidCerts off" to nss.conf so the server can start until the problem can be resolved.
[Sun Sep 22 10:45:53 2013] [error] Certificate not verified: 'Server-Cert'
[Sun Sep 22 10:45:53 2013] [error] SSL Library Error: -8181 Certificate has expired
[Sun Sep 22 10:45:53 2013] [error] Unable to verify certificate 'Server-Cert'. Add "NSSEnforceValidCerts off" to nss.conf so the server can start until the problem can be resolved.造成此问题的根本原因是在一个名为nss的模块中。mod_nss是mod_ssl的另一种选择;它做了一些mod_ssl不做的事情,并且可以沿着mod_ssl运行。有关更多信息,请浏览链接什么是国防部?_nss,关于建立模型_NSS,更多细节
步骤7:从httpd .d目录中删除nss.conf文件
#cd /etc/httpd/conf.d
#mv nss.conf nss.conf.orig
#mv ssl.conf ssl.conf.orig
#/etc/init.d/httpd start
Start httpd [OK]发布于 2015-01-04 13:58:34
通过在CentOS 6中重新安装CentOS 6中的yum erase mod_ssl并使用yum mod_ssl安装它,我对此进行了修正。这应该能解决问题。
https://unix.stackexchange.com/questions/148224
复制相似问题