{"id":143,"date":"2019-09-21T15:18:40","date_gmt":"2019-09-21T07:18:40","guid":{"rendered":"https:\/\/www.notownho.top\/?p=143"},"modified":"2019-09-21T15:18:40","modified_gmt":"2019-09-21T07:18:40","slug":"%e5%a6%82%e4%bd%95%e7%bb%99%e8%87%aa%e5%b7%b1%e7%bd%91%e7%ab%99%e9%83%a8%e7%bd%b2https","status":"publish","type":"post","link":"https:\/\/www.notown.top\/?p=143","title":{"rendered":"\u5982\u4f55\u7ed9\u81ea\u5df1\u7f51\u7ad9\u90e8\u7f72https"},"content":{"rendered":"<h2>\u7b2c\u4e00\u6b65\u3001\u51c6\u5907\u597dssl\u8bc1\u4e66<\/h2>\n<p>\u6211\u7684\u57df\u540d\u662f\u5728\u963f\u91cc\u4e91\u4e70\u7684\uff0c\u6240\u4ee5\u9996\u5148\u53bb\u7533\u8bf7\u4e00\u4e2a\u54af<img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-144\" src=\"https:\/\/www.notown.club\/wp-content\/uploads\/2019\/09\/bei1-1024x559.png\" alt=\"\" width=\"829\" height=\"453\" \/><br \/>\n\u9009\u4e2a\u514d\u8d39\u7684\u5c31\u884c\uff0c\u4e70\u597d\u4e86\u4e4b\u540e\u6211\u4eec\u4e0b\u8f7d\u8fd9\u4e2a\u8bc1\u4e66\uff0c\u5e94\u8be5\u662f\u4e00\u4e2a\u538b\u7f29\u5305\uff0c\u91cc\u9762\u6709\u4e09\u4e2a\u6587\u4ef6\uff0c\u4e24\u4e2acrt\u6587\u4ef6\uff0c\u4e00\u4e2akey\u6587\u4ef6\u3002<\/p>\n<h2>\u7b2c\u4e8c\u6b65\u3001\u5b89\u88c5ssl\u8bc1\u4e66<\/h2>\n<p>1\u3001\u5148\u5b89\u88c5<span style=\"color: #3366ff;\">mod_ssl.so<\/span>\u6a21\u5757\uff0c\u5728\u670d\u52a1\u5668\u4e0a\u8f93\u5165\u547d\u4ee4<\/p>\n<blockquote><p>yum install mod_ssl<\/p><\/blockquote>\n<p>\u6ca1\u88c5yum\u7684\u4e5f\u53ef\u4ee5apt-get install mod_ssl<br \/>\n2\u3001\u5c06\u5df2\u83b7\u53d6\u5230\u7684xxx_public.crt\u8bc1\u4e66\u6587\u4ef6\u3001xxx_chain.crt \u8bc1\u4e66\u6587\u4ef6\u4ee5\u53ca .com.key \u79c1\u94a5\u6587\u4ef6\u4ece\u672c\u5730\u76ee\u5f55\u62f7\u8d1d\u5230 Apache \u670d\u52a1\u5668\u7684 \/etc\/httpd\/ssl \u76ee\u5f55\u4e0b\u3002<br \/>\n\uff08\u56e0\u4e3a\u6211\u7684wordpress\u662f\u5efa\u5728apache\u4e0a\u7684\uff0cnginx\u7684\u4e5f\u662f\u540c\u7406\u5427\uff09<br \/>\n\uff08\u6ca1\u6709ssl\u6587\u4ef6\u5939\u5c31\u81ea\u5df1\u521b\u4e00\u4e2a\u653e\u7740\uff09<br \/>\n3\u3001\u5728 <code>\/etc\/httpd\/conf<\/code>\u00a0\u76ee\u5f55\u4e0b\u7684 httpd.conf \u914d\u7f6e\u6587\u4ef6\u627e\u5230\u00a0<code>Include conf.modules.d\/*.conf<\/code>\uff08\u7528\u4e8e\u52a0\u8f7d\u914d\u7f6e SSL \u7684\u914d\u7f6e\u76ee\u5f55\uff09\u914d\u7f6e\u8bed\u53e5\uff0c\u5e76\u786e\u8ba4\u8be5\u914d\u7f6e\u8bed\u53e5\u672a\u88ab\u6ce8\u91ca\u3002\u82e5\u5df2\u6ce8\u91ca\uff0c\u8bf7\u53bb\u6389\u9996\u884c\u7684\u6ce8\u91ca\u7b26\u53f7\uff08<code>#<\/code>\uff09\uff0c\u4fdd\u5b58\u914d\u7f6e\u6587\u4ef6\u3002<br \/>\n3\u3001\u5728 \/etc\/httpd\/conf.modules.d \u76ee\u5f55\u4e0b\u7684 00-ssl.conf \u914d\u7f6e\u6587\u4ef6\u627e\u5230 LoadModule ssl_module modules\/mod_ssl.so\uff08\u7528\u4e8e\u52a0\u8f7d SSL \u6a21\u5757\uff09\u914d\u7f6e\u8bed\u53e5\uff0c\u5e76\u786e\u8ba4\u8be5\u914d\u7f6e\u8bed\u53e5\u672a\u88ab\u6ce8\u91ca\uff0c\u82e5\u5df2\u6ce8\u91ca\uff0c\u8bf7\u53bb\u6389\u9996\u884c\u7684\u6ce8\u91ca\u7b26\u53f7\uff08#\uff09\uff0c\u4fdd\u5b58\u914d\u7f6e\u6587\u4ef6<br \/>\n4\u3001\u7f16\u8f91 \/etc\/httpd\/conf.d \u76ee\u5f55\u4e0b\u7684 ssl.conf \u914d\u7f6e\u6587\u4ef6\u3002\u6dfb\u52a0\u5982\u4e0b\u5185\u5bb9\uff1a<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-145\" src=\"https:\/\/www.notown.club\/wp-content\/uploads\/2019\/09\/bei2.png\" alt=\"\" width=\"804\" height=\"554\" \/><br \/>\n\u5c31\u662f\u5728\u9ed8\u8ba4\u7684VirtualHost_default_:443\u4e0a\u589e\u52a0\u4e00\u4e2a\u81ea\u5df1\u7684<br \/>\ndoc root\u6307\u7684\u662f\u4f60wordpress\u4f4d\u7f6e\uff0c\u6bcf\u4e2a\u4eba\u53ef\u80fd\u4e0d\u540c\uff08\u8fd9\u91cc\u5199\u9519\u4e86\uff0c\u5230\u65f6\u5019\u5c31\u4f1a\u6307\u5411\u4e00\u4e2a\u7a7a\u7684\u963f\u5e15\u5947\u6d4b\u8bd5\u9875\u9762\uff09<br \/>\nserver name\u662f\u4f60\u7684\u57df\u540d\uff0c\u522b\u5199\u9519\u4e86<br \/>\n\u8bc1\u4e66\u8def\u5f84\u5c31\u662f\u521a\u521a\u8ba9\u4f60\u653e\u8fdb\u53bb\u7684\u4e09\u4e2a\u6587\u4ef6\u8def\u5f84<br \/>\n\u6539\u597d\u540e\uff0c\u5c31\u53ef\u4ee5\u91cd\u542f\u963f\u5e15\u5947\u670d\u52a1\uff0c\u767b\u5f55\u4f60\u7684\u57df\u540d\u8bd5\u8bd5<br \/>\n\uff08\u4ec0\u4e48\uff0c\u4f60\u8fd8\u4e0d\u77e5\u9053\u4f60\u7684\u963f\u5e15\u5947\u670d\u52a1\u91cd\u542f\u547d\u4ee4\uff1f service httpd restart\u554a\uff09<\/p>\n<h2>\u7b2c\u4e09\u6b65\u3001wordpress\u7f51\u7ad9\u914d\u7f6e<\/h2>\n<p>\u8fdb\u5165WP\u540e\u53f0\uff0c\u8fdb\u5165\u8bbe\u7f6e-\u5e38\u89c4 \u5c06WordPress\u5730\u5740\uff08URL\uff09\u3001\u7ad9\u70b9\u5730\u5740\uff08URL\uff09\u4e24\u9879\u4fee\u6539\u4e3a\uff1ahttps:\/\/www.domain.com\uff08\u5373\u4f60\u7684\u57df\u540d\uff09<\/p>\n<h2>\u7b2c\u56db\u6b65\u3001\u767b\u5f55\u548c\u540e\u53f0\u4e5f\u5f3a\u5236\u5f00\u542fSSL<\/h2>\n<p>\u627e\u5230wp-config.php\u6587\u4ef6\u5e76\u4fee\u6539\uff0c\u53ef\u5728\u670d\u52a1\u5668\u4e0a\u8f93\u5165find \/\u00a0 -name wp-config.php\u5bfb\u627e\u8be5\u6587\u4ef6\uff08\u636e\u8bf4\u4e5f\u6709\u53ef\u80fd\u662f\u5927\u5199\u7684WP\uff09<br \/>\n\u76f4\u63a5\u5728\u6587\u4ef6\u672b\u5c3e\u52a0\u5165\u4ee5\u4e0b\u4e24\u884c\u4ee3\u7801\uff1a<\/p>\n<blockquote><p>\/* \u5f3a\u5236\u540e\u53f0\u548c\u767b\u5f55\u4f7f\u7528 SSL *\/<br \/>\ndefine(&#8216;FORCE_SSL_LOGIN&#8217;, true);<br \/>\ndefine(&#8216;FORCE_SSL_ADMIN&#8217;, true);<\/p><\/blockquote>\n<p>\u6700\u540e\u518d\u91cd\u542f\u4e00\u4e0b\u670d\u52a1\uff0c\u5927\u529f\u544a\u6210\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u7b2c\u4e00\u6b65\u3001\u51c6\u5907\u597dssl\u8bc1\u4e66 \u6211\u7684\u57df\u540d\u662f\u5728\u963f\u91cc\u4e91\u4e70\u7684\uff0c\u6240\u4ee5\u9996\u5148\u53bb\u7533\u8bf7\u4e00\u4e2a\u54af \u9009\u4e2a\u514d\u8d39\u7684\u5c31\u884c\uff0c\u4e70\u597d\u4e86\u4e4b\u540e\u6211\u4eec\u4e0b\u8f7d\u8fd9\u4e2a&hellip;<a href=\"https:\/\/www.notown.top\/?p=143\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">\u5982\u4f55\u7ed9\u81ea\u5df1\u7f51\u7ad9\u90e8\u7f72https<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_import_markdown_pro_load_document_selector":0,"_import_markdown_pro_submit_text_textarea":"","footnotes":""},"categories":[4],"tags":[],"class_list":["post-143","post","type-post","status-publish","format-standard","hentry","category-4"],"_links":{"self":[{"href":"https:\/\/www.notown.top\/index.php?rest_route=\/wp\/v2\/posts\/143","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.notown.top\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.notown.top\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.notown.top\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.notown.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=143"}],"version-history":[{"count":0,"href":"https:\/\/www.notown.top\/index.php?rest_route=\/wp\/v2\/posts\/143\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.notown.top\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=143"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.notown.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=143"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.notown.top\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=143"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}