{"id":2973,"date":"2016-12-15T09:41:39","date_gmt":"2016-12-15T01:41:39","guid":{"rendered":"http:\/\/blog.sega.com.tw\/?p=2973"},"modified":"2025-12-09T11:34:36","modified_gmt":"2025-12-09T03:34:36","slug":"centos-apache%e7%84%a1%e6%b3%95%e5%95%9f%e5%8b%95-httpd%e9%96%8b%e6%a9%9f%e7%84%a1%e6%b3%95%e5%95%9f%e5%8b%95","status":"publish","type":"post","link":"https:\/\/blog.sega.com.tw\/?p=2973","title":{"rendered":"CentOS Apache\u7121\u6cd5\u555f\u52d5 httpd\u958b\u6a5f\u7121\u6cd5\u555f\u52d5"},"content":{"rendered":"<p>2016.12.15 (W4)<\/p>\n<p>\u7d42\u65bc\u8f2a\u5230\u6211\u9047\u5230\u4e86\uff0c\u4eca\u5929\u65e9\u6668Cent OS \u4e3b\u6a5f\u91cd\u958b\u4e4b\u5f8c\u5c31\u767c\u751fhttpd\u7121\u6cd5\u555f\u52d5\u7684\u554f\u984c\uff0c\u5370\u8c61\u4e2d\u4e4b\u524d\u4e5f\u9047\u904e\u4e00\u6b21\uff0c\u6700\u5f8c\u597d\u50cf\u662f\u6574\u500bCentOS\u780d\u6389\u91cd\u7df4\uff0c\u9019\u5de5\u7a0b\u6d69\u5927\u554a\uff0c\u9019\u6b21google\u4e86\u4e00\u4e0b\u7db2\u8def\u4e0a\u7684\u6587\u7ae0\uff0c\u9084\u597d\u6709\u89e3\u6c7a\uff0c\u6240\u4ee5\u81ea\u5df1\u4e5f\u5beb\u4e00\u7bc7\u5206\u4eab\u51fa\u4f86\u7d66\u5404\u4f4d\u3002<\/p>\n<p>\u6240\u6709\u7684\u670d\u52d9\u9664\u4e86httpd\u6c92\u6cd5\u555f\u52d5\u4e4b\u5916\uff0c\u5176\u9918\u7684\u670d\u52d9\u90fd\u5df2\u7d93\u6b63\u5e38\u555f\u52d5\uff0c\u6bd4\u5982\u8aaamysqld&#8230;&#8230;.\u7b49\u7b49<\/p>\n<p style=\"text-align: center;\"><!--more--><\/p>\n<p><span style=\"color: #0000ff;\">\u9996\u5148\u5148\u78ba\u8a8dhttpd\u7121\u6cd5\u555f\u7528<\/span><\/p>\n<blockquote><p># service httpd restart<br \/>\nStop httpd \u00a0 \u00a0[<span style=\"color: #ff0000;\">FAILED<\/span>]<br \/>\nStart httpd \u00a0 [<span style=\"color: #ff0000;\">FAILED<\/span>]<\/p><\/blockquote>\n<p><span style=\"color: #0000ff;\">\u78ba\u8a8dhttpd error log file<\/span><\/p>\n<blockquote><p># grep suexec \/var\/log\/httpd\/error_log<\/p>\n<p>[root@www conf.d]# grep suexec \/var\/log\/httpd\/error_log<br \/>\n[Thu Dec 15 08:11:48 2016] [notice] suEXEC mechanism enabled (wrapper: \/usr\/sbin\/suexec)<br \/>\n[Thu Dec 15 08:14:40 2016] [notice] suEXEC mechanism enabled (wrapper: \/usr\/sbin\/suexec)<br \/>\n[Thu Dec 15 08:36:29 2016] [notice] suEXEC mechanism enabled (wrapper: \/usr\/sbin\/suexec)<br \/>\n[Thu Dec 15 08:50:16 2016] [notice] suEXEC mechanism enabled (wrapper: \/usr\/sbin\/suexec)<br \/>\n[Thu Dec 15 08:50:18 2016] [notice] suEXEC mechanism enabled (wrapper: \/usr\/sbin\/suexec)<br \/>\n[Thu Dec 15 08:54:21 2016] [notice] suEXEC mechanism enabled (wrapper: \/usr\/sbin\/suexec)<br \/>\n[Thu Dec 15 09:11:31 2016] [notice] suEXEC mechanism enabled (wrapper: \/usr\/sbin\/suexec)<\/p><\/blockquote>\n<p><span style=\"color: #0000ff;\">\u78ba\u8a8d httpd nss error log file<\/span><\/p>\n<blockquote><p>#tail -300 \/var\/log\/httpd\/error_log<\/p>\n<p>[Thu Dec 15 08:50:18 2016] [notice] suEXEC mechanism enabled (wrapper: \/usr\/sbin\/suexec)<br \/>\n[Thu Dec 15 08:50:18 2016] [error] SSL Library Error: -8181 Certificate has expired<br \/>\n[Thu Dec 15 08:50:18 2016] [error] Unable to verify certificate &#8216;Server-Cert&#8217;. Add &#8220;NSSEnforceValidCerts off&#8221; to nss.conf so the server can start until the problem can be resolved.<br \/>\n[Thu Dec 15 08:54:21 2016] [notice] suEXEC mechanism enabled (wrapper: \/usr\/sbin\/suexec)<br \/>\n[Thu Dec 15 08:54:22 2016] [error] SSL Library Error: -8181 Certificate has expired<br \/>\n[Thu Dec 15 08:54:22 2016] [error] Unable to verify certificate &#8216;Server-Cert&#8217;. Add &#8220;NSSEnforceValidCerts off&#8221; to nss.conf so the server can start until the problem can be resolved.<\/p><\/blockquote>\n<p><span style=\"color: #0000ff;\">\u7b2c\u4e00\u7a2e\u8655\u7406\u65b9\u5f0f(\u4e0d\u904e\u6211\u9019\u908a\u8a66\u904e\u6211\u7684\u6c92\u7528 XD)<\/span><\/p>\n<blockquote><p><span style=\"color: #0000ff;\">\u628anss.conf \u66f4\u540d<\/span><br \/>\n#cd \/etc\/httpd\/conf.d<br \/>\n#mv nss.conf nss.conf.orig<br \/>\n<span style=\"color: #0000ff;\">\u555f\u52d5httpd\u670d\u52d9<\/span><br \/>\n#service httpd restart<br \/>\nStarting httpd: httpd: Syntax error on line 221 of \/etc\/httpd\/conf\/httpd.conf: Syntax error on line 1 of \/etc\/httpd\/conf.d\/revocator.conf: Cannot load \/etc\/httpd\/modules\/mod_rev.so into server: \/etc\/httpd\/modules\/mod_rev.so: undefined symbol: nss_die<br \/>\n[<span style=\"color: #ff0000;\">FAILED<\/span>]<\/p><\/blockquote>\n<p><span style=\"color: #0000ff;\">\u7b2c\u4e8c\u7a2e\u8655\u7406\u65b9\u5f0f(\u6709\u6210\u529f)<\/span><\/p>\n<blockquote><p>\u4fee\u6539 \/etc\/httpd\/conf.d\/nss.conf \u88e1\u7684 NSSEngine \u9019\u500b\u53c3\u6578\u70ba off \u4f86\u95dc\u9589\u9019\u500b\u8a0a\u606f<\/p><\/blockquote>\n<p>\u4fee\u6539\u597d\u4e4b\u5f8c\uff0c\u91cd\u65b0\u555f\u52d5httpd\uff0c\u5b8c\u6210\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>2016.12.15 (W4) \u7d42\u65bc\u8f2a\u5230\u6211\u9047\u5230\u4e86\uff0c\u4eca\u5929\u65e9\u6668Cent OS \u4e3b\u6a5f\u91cd\u958b\u4e4b\u5f8c\u5c31\u767c\u751fhttpd\u7121\u6cd5\u555f\u52d5 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":3868,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"googlesitekit_rrm_CAow5au9DA:productID":"","footnotes":""},"categories":[6],"tags":[89,25,24],"class_list":["post-2973","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-6","tag-centos","tag-25","tag-24"],"views":83309,"_links":{"self":[{"href":"https:\/\/blog.sega.com.tw\/index.php?rest_route=\/wp\/v2\/posts\/2973","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.sega.com.tw\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.sega.com.tw\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.sega.com.tw\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.sega.com.tw\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2973"}],"version-history":[{"count":7,"href":"https:\/\/blog.sega.com.tw\/index.php?rest_route=\/wp\/v2\/posts\/2973\/revisions"}],"predecessor-version":[{"id":3566,"href":"https:\/\/blog.sega.com.tw\/index.php?rest_route=\/wp\/v2\/posts\/2973\/revisions\/3566"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.sega.com.tw\/index.php?rest_route=\/wp\/v2\/media\/3868"}],"wp:attachment":[{"href":"https:\/\/blog.sega.com.tw\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2973"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.sega.com.tw\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2973"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.sega.com.tw\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2973"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}