{"id":1123,"date":"2022-02-22T12:06:43","date_gmt":"2022-02-22T04:06:43","guid":{"rendered":"https:\/\/crab.cool\/?p=1123"},"modified":"2024-09-15T12:17:08","modified_gmt":"2024-09-15T04:17:08","slug":"%e8%85%be%e8%ae%af%e4%ba%91%e8%bd%bb%e9%87%8f%e6%9c%8d%e5%8a%a1%e5%99%a8%e9%85%8d%e7%bd%aehttps%e9%81%bf%e5%9d%91","status":"publish","type":"post","link":"https:\/\/crab.cool\/index.php\/2022\/02\/22\/%e8%85%be%e8%ae%af%e4%ba%91%e8%bd%bb%e9%87%8f%e6%9c%8d%e5%8a%a1%e5%99%a8%e9%85%8d%e7%bd%aehttps%e9%81%bf%e5%9d%91\/","title":{"rendered":"\u817e\u8baf\u4e91\u8f7b\u91cf\u670d\u52a1\u5668\u914d\u7f6ehttps\u907f\u5751"},"content":{"rendered":"<p>2024\u5e749\u6708\u8865\u5145\uff1a<\/p>\n<p>\u65b0\u7684ssl\u8bc1\u4e66\u914d\u7f6e\u65b9\u5f0f\uff0c\u53ef\u4ee5\u4f7f\u7528\u5b9d\u5854\u9762\u677f\u4e0b\u4f7f\u7528letsEncrypt\u5b9e\u73b0\u514d\u8d39\u81ea\u52a8\u914d\u7f6e\uff0c<br \/>\n\u53c2\u8003\u6587\u7ae0 <a href=\"https:\/\/crab.cool\/index.php\/2024\/09\/10\/%e5%9c%a8%e8%85%be%e8%ae%af%e8%bd%bb%e9%87%8f%e5%ba%94%e7%94%a8%e6%9c%8d%e5%8a%a1%e5%99%a8%e4%b8%8a%e9%83%a8%e7%bd%b2memos\/\">\u5728\u817e\u8baf\u8f7b\u91cf\u5e94\u7528\u670d\u52a1\u5668\u4e0a\u90e8\u7f72memos<\/a><\/p>\n<p>\u4ee5\u4e0b\u4e3a\u65e7\u65b9\u6cd5\uff0c\u4e0a\u8ff0\u81ea\u52a8\u914d\u7f6e\u5c31\u662f\u8fd9\u6837\u901a\u8fc7\u540e\u53f0\u5b9e\u73b0\u7684:<\/p>\n<hr \/>\n<p>\u505a\u4ee5\u4e0b\u4e8b\u60c5\u4e4b\u524d\uff0c\u8bf7\u5728\u81ea\u5df1\u7684\u817e\u8baf\u4e91\u8f7b\u91cf\u670d\u52a1\u5668\u9762\u677f\u91cc\u70b9\u5f00wordpress\u5b9e\u4f8b\u770b\u770b\uff0c\u9ed8\u8ba4\u7684\u5b89\u88c5\u4f4d\u7f6e\u662f\u5426\u5982\u4e0b\uff1a<\/p>\n<ul>\n<li><strong>WordPress<\/strong> \/usr\/local\/lighthouse\/softwares\/wordpress<\/li>\n<li><strong>Nginx<\/strong> \/usr\/local\/lighthouse\/softwares\/nginx<\/li>\n<\/ul>\n<p>\u786e\u8ba4\u65e0\u8bef\uff1f\u90a3\u4e48\uff0c\u4ee5\u4e0b\u6559\u7a0b\u662f\u5bf9\u60a8\u662f\u6709\u7528\u7684\u3002<\/p>\n<p>\u9996\u5148\uff0c\u6309\u7167 <a href=\"https:\/\/cloud.tencent.com\/document\/product\/400\/35244\">\u5b98\u65b9\u8bf4\u660e<\/a> \u64cd\u4f5c\u3002<\/p>\n<p>\u8fd9\u4e2a\u6b65\u9aa4\u91cc\uff0c\u8981\u6ce8\u610f\u7684\u4e8b\u9879\u5982\u4e0b\uff1a<\/p>\n<blockquote>\n<ul>\n<li>\u4f7f\u7528 Winscp\uff0c\u9996\u5148\u8981\u5728\u8f7b\u91cf\u670d\u52a1\u5668\u9762\u677f\u91cc\u8bbe\u7f6e\u5bc6\u7801\uff0c<a href=\"https:\/\/cloud.tencent.com\/developer\/article\/1875209\">\u65b9\u6cd5\u70b9\u6b64\u94fe\u63a5<\/a> \uff1b<\/li>\n<li>\u7528 Winscp \u628a\u4e24\u4e2a https \u8bc1\u4e66\u6587\u4ef6\u590d\u5236\u5230 \/usr\/local\/lighthouse\/softwares\/nginx\/conf \u6587\u4ef6\u5939\u4e0b\uff1b<\/li>\n<li>Winscp \u652f\u6301\u53f3\u952e\u70b9\u51fb\u6587\u4ef6\u7f16\u8f91\uff0c\u4e0d\u5fc5\u4f7f\u7528 Putty \u91cc\u7684 vim \u7f16\u8f91\u65b9\u5f0f\uff0c\u6309\u7167\u5b98\u65b9\u8bf4\u660e\uff0c\u628a\u90a3\u4e00\u6bb5 server {} \u52a0\u5728 nginx.conf \u91cc\u5c31\u53ef\u4ee5\uff1b<\/li>\n<li>\u8fdb\u5165 Putty \uff0c\u7528 cd \/usr\/local\/lighthouse\/softwares\/nginx\/sbin \u547d\u4ee4\u8fdb\u5165 nginx \u8fd0\u884c\u76ee\u5f55\uff0c\u8f93\u5165 .\/nginx -t \u8fdb\u884c\u9a8c\u8bc1\uff0c\u8fd4\u56de\u7ed3\u679c\u662f ok \u5219 conf \u4fee\u6539\u7ed3\u679c\u6ca1\u95ee\u9898\u2014\u2014\u5982\u679c\u62a5\u9519\uff0c\u57fa\u672c\u662f\u6309\u7167\u5b98\u65b9\u8bf4\u660e\u4e22\u5b57\u843d\u5b57\uff0c\u8bf7\u6309\u7167\u51fa\u9519\u63d0\u793a\u6539\u6b63 conf \u6587\u4ef6\u2014\u2014\u8bf7\u518d\u8f93\u5165 .\/nginx -s reload \u91cd\u542f\u4ee5\u4f7f conf \u6587\u4ef6\u751f\u6548\u3002<\/li>\n<\/ul>\n<\/blockquote>\n<p>\u8fd9\u4e00\u756a\u64cd\u4f5c\u540e\uff0c\u8bbf\u95ee\u60a8\u7684 <a href=\"https:\/\/***.com\">https:\/\/***.com<\/a> \u5e94\u8be5\u53ef\u4ee5\u770b\u5230 Welcome to nginx \u7684\u5b57\u6837\u4e86\u3002<\/p>\n<p>\u7136\u540e\uff0c\u6253\u5f00\u8fd9\u4e2a <a href=\"https:\/\/blog.csdn.net\/qq_33074817\/article\/details\/122357950\">\u907f\u5751\u94fe\u63a5<\/a> \uff0c\u64cd\u4f5c\u65f6\u4e5f\u8981\u6ce8\u610f\u907f\u5f00\u4ee5\u4e0b\u51e0\u4e2a\u5751\uff1a<\/p>\n<blockquote>\n<ul>\n<li>\u6587\u7ae0\u63d0\u5230\u7684 conf \u6587\u4ef6\u5168\u79f0\u5e94\u8be5\u662f wordpress.conf\uff1b<\/li>\n<li>\u8981\u6dfb\u52a0\u7684\u5185\u5bb9\uff0c\u6ce8\u610f \/root\/\u57df\u540d.bundle.crt \u548c \/root\/\u57df\u540d.key \u8fd9\u4e24\u4e2a\u4f4d\u7f6e\uff0c\u628a \/root \u66ff\u6362\u6210 \/usr\/local\/lighthouse\/softwares\/nginx\/conf\uff0c\u5426\u5219\u4f1a\u627e\u4e0d\u5230\u8fd9\u4e24\u4e2a\u6587\u4ef6\u62a5\u9519\uff1b<\/li>\n<li>\u8fdb\u5165 Putty \uff0c\u7528 cd \/usr\/local\/lighthouse\/softwares\/nginx\/sbin \u547d\u4ee4\u8fdb\u5165 nginx \u8fd0\u884c\u76ee\u5f55\uff0c\u8f93\u5165 .\/nginx -t \uff0c\u8fd4\u56de\u7ed3\u679c\u662f ok \u5219 conf \u4fee\u6539\u7ed3\u679c\u6ca1\u95ee\u9898\u2014\u2014\u5982\u679c\u62a5\u9519\uff0c\u57fa\u672c\u662f\u6309\u7167\u5b98\u65b9\u8bf4\u660e\u4e22\u5b57\u843d\u5b57\uff0c\u8bf7\u6309\u7167\u51fa\u9519\u63d0\u793a\u6539\u6b63 conf \u6587\u4ef6\u2014\u2014\u8bf7\u518d\u8f93\u5165 .\/nginx -s reload \u91cd\u542f\u4ee5\u4f7f conf \u6587\u4ef6\u751f\u6548\uff1b<\/li>\n<li>\u5982\u679c\u63d0\u793a conflicting server name \"***.com\" on 0.0.0.0:443\uff0c\u8bf7\u8fdb\u5165 \/usr\/local\/lighthouse\/softwares\/nginx\/conf \u6587\u4ef6\u5939\uff0c\u7f16\u8f91 nginx.conf \u6587\u4ef6\uff0c\u628a server_name \u90a3\u4e00\u884c\u5220\u6389\uff1b<\/li>\n<li>\u518d\u6b21\u8fdb\u5165 Putty \u9a8c\u8bc1\u548c\u91cd\u542f\uff0c\u8fd9\u4e2a\u65f6\u5019\u5c31\u53ef\u4ee5\u8bbf\u95ee https \uff0c\u5982\u679c\u8fd8\u6709\u95ee\u9898\uff0c\u6362\u4e2a\u6d4f\u89c8\u5668\u6216\u8005\u6e05\u4e00\u4e0b\u6d4f\u89c8\u5668\u7f13\u5b58\u518d\u8bd5\u3002<\/li>\n<\/ul>\n<\/blockquote>\n<p>\u8c03\u901a\u90a3\u4e00\u523b\u6211\u662f\u5f88\u5f00\u5fc3\u7684\uff0c\u4e5f\u795d\u5927\u5bb6\u73a9\u5f97\u5f00\u5fc3\uff01<\/p>\n<p>\u6709\u95ee\u9898\u8bf7\u7559\u8a00\uff0c\u6211\u4f1a\u53ca\u65f6\u56de\u590d\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>2024\u5e749\u6708\u8865\u5145\uff1a \u65b0\u7684ssl\u8bc1\u4e66\u914d\u7f6e\u65b9\u5f0f\uff0c\u53ef\u4ee5\u4f7f\u7528\u5b9d\u5854\u9762\u677f\u4e0b\u4f7f\u7528letsEncrypt\u5b9e\u73b0\u514d\u8d39\u81ea\u52a8\u914d\u7f6e\uff0c  &hellip; <a href=\"https:\/\/crab.cool\/index.php\/2022\/02\/22\/%e8%85%be%e8%ae%af%e4%ba%91%e8%bd%bb%e9%87%8f%e6%9c%8d%e5%8a%a1%e5%99%a8%e9%85%8d%e7%bd%aehttps%e9%81%bf%e5%9d%91\/\" class=\"more-link\">\u7ee7\u7eed\u9605\u8bfb<span class=\"screen-reader-text\">\u817e\u8baf\u4e91\u8f7b\u91cf\u670d\u52a1\u5668\u914d\u7f6ehttps\u907f\u5751<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[73,10,14,18,21,37,39,41],"class_list":["post-1123","post","type-post","status-publish","format-standard","hentry","category-tips","tag-centos","tag-conf","tag-https","tag-nginx","tag-wordpress","tag-37","tag-39","tag-41"],"_links":{"self":[{"href":"https:\/\/crab.cool\/index.php\/wp-json\/wp\/v2\/posts\/1123","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/crab.cool\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/crab.cool\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/crab.cool\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/crab.cool\/index.php\/wp-json\/wp\/v2\/comments?post=1123"}],"version-history":[{"count":3,"href":"https:\/\/crab.cool\/index.php\/wp-json\/wp\/v2\/posts\/1123\/revisions"}],"predecessor-version":[{"id":1471,"href":"https:\/\/crab.cool\/index.php\/wp-json\/wp\/v2\/posts\/1123\/revisions\/1471"}],"wp:attachment":[{"href":"https:\/\/crab.cool\/index.php\/wp-json\/wp\/v2\/media?parent=1123"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/crab.cool\/index.php\/wp-json\/wp\/v2\/categories?post=1123"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/crab.cool\/index.php\/wp-json\/wp\/v2\/tags?post=1123"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}