\u514d\u8d39ssl\u7533\u8bf7\u6307\u5357<\/a>\u6216\u8005SSL\u8bc1\u4e66\u9881\u53d1\u673a\u6784\u7684\u6587\u6863\u3002<\/p>\n4. \u6d4b\u8bd5SSL\u8bc1\u4e66<\/p>\n
\u5b89\u88c5\u5b8cSSL\u8bc1\u4e66\u5e76\u914d\u7f6eWeb\u670d\u52a1\u5668\u4e4b\u540e\uff0c\u9700\u8981\u6d4b\u8bd5SSL\u8bc1\u4e66\u662f\u5426\u751f\u6548\u3002\u53ef\u4ee5\u901a\u8fc7\u6d4f\u89c8\u5668\u8bbf\u95ee\u7f51\u7ad9\uff0c\u67e5\u770b\u6d4f\u89c8\u5668\u5730\u5740\u680f\u4e2d\u7684\u9501\u6807\u5fd7\u662f\u5426\u663e\u793a\uff0c\u5e76\u4e14\u67e5\u770b\u8bc1\u4e66\u7684\u8be6\u7ec6\u4fe1\u606f\u662f\u5426\u6b63\u786e\u3002<\/p>\n
SSL\u8bc1\u4e66\u7684\u90e8\u7f72\u6b65\u9aa4<\/p>\n
\u4e0b\u9762\u662fSSL\u8bc1\u4e66\u7684\u90e8\u7f72\u6b65\u9aa4\uff1a<\/p>\n
1. \u751f\u6210SSL\u8bc1\u4e66<\/p>\n
\u9996\u5148\uff0c\u9700\u8981\u5728Web\u670d\u52a1\u5668\u4e0a\u751f\u6210SSL\u8bc1\u4e66\u3002\u53ef\u4ee5\u4f7f\u7528OpenSSL\u7b49\u5de5\u5177\u6765\u751f\u6210\u8bc1\u4e66\u3002\u4ee5\u4e0b\u662f\u4e00\u4e2a\u4f7f\u7528OpenSSL\u751f\u6210\u81ea\u7b7e\u540d\u8bc1\u4e66\u7684\u4f8b\u5b50\uff1a<\/p>\n
“`<\/p>\n
openssl req -x509 -newkey rsa:2048 -nodes -keyout example.key -out example.crt -days 365<\/p>\n
“`<\/p>\n
\u8fd9\u4e2a\u547d\u4ee4\u4f1a\u751f\u6210\u4e00\u4e2a\u6709\u6548\u671f\u4e3a365\u5929\u7684\u81ea\u7b7e\u540d\u8bc1\u4e66\u548c\u79c1\u94a5\u3002<\/p>\n
2. \u5b89\u88c5SSL\u8bc1\u4e66<\/p>\n
\u5c06\u751f\u6210\u7684\u8bc1\u4e66\u6587\u4ef6\u548c\u79c1\u94a5\u6587\u4ef6\u653e\u7f6e\u5728Web\u670d\u52a1\u5668\u4e0a\u3002\u4e00\u822c\u6765\u8bf4\uff0c\u8bc1\u4e66\u6587\u4ef6\u4e00\u822c\u662f\u4ee5.crt\u6216.pem\u4e3a\u6269\u5c55\u540d\u7684\u6587\u4ef6\uff0c\u79c1\u94a5\u6587\u4ef6\u4e00\u822c\u662f\u4ee5.key\u4e3a\u6269\u5c55\u540d\u7684\u6587\u4ef6\u3002<\/p>\n
\u4ee5Apache\u670d\u52a1\u5668\u4e3a\u4f8b\uff0c\u53ef\u4ee5\u5c06\u8bc1\u4e66\u6587\u4ef6\u548c\u79c1\u94a5\u6587\u4ef6\u653e\u7f6e\u5728\/etc\/ssl\/certs\u548c\/etc\/ssl\/private\u76ee\u5f55\u4e0b\u3002<\/p>\n
3. \u914d\u7f6eWeb\u670d\u52a1\u5668<\/p>\n
\u4fee\u6539Apache\u670d\u52a1\u5668\u7684\u914d\u7f6e\u6587\u4ef6httpd.conf\uff0c\u6dfb\u52a0\u4ee5\u4e0b\u914d\u7f6e\uff1a<\/p>\n
“`<\/p>\n
\n
ServerName example.com<\/p>\n
SSLEngine on<\/p>\n
SSLCertificateFile \/etc\/ssl\/certs\/example.crt<\/p>\n
SSLCertificateKeyFile \/etc\/ssl\/private\/example.key<\/p>\n<\/p>\n
“`<\/p>\n
\u8fd9\u4e2a\u914d\u7f6e\u4f1a\u5c06example.com\u7f51\u7ad9\u7684HTTPS\u534f\u8bae\u542f\u7528\uff0c\u5e76\u4f7f\u7528\/etc\/ssl\/certs\/example.crt\u548c\/etc\/ssl<\/p>\n
<\/figure>\n<\/p>\n\/private\/example.key\u4f5c\u4e3a\u8bc1\u4e66\u548c\u79c1\u94a5\u3002<\/p>\n
4. \u6d4b\u8bd5SSL\u8bc1\u4e66<\/p>\n
\u4f7f\u7528\u6d4f\u89c8\u5668\u8bbf\u95eehttps:\/\/example.com\uff0c\u5982\u679c\u6d4f\u89c8\u5668\u5730\u5740\u680f\u4e2d\u7684\u9501\u6807\u5fd7\u663e\u793a\uff0c\u5e76\u4e14\u8bc1\u4e66\u7684\u8be6\u7ec6\u4fe1\u606f\u6b63\u786e\uff0c\u5c31\u8bf4\u660eSSL\u8bc1\u4e66\u90e8\u7f72\u6210\u529f\u3002<\/p>\n
\u603b\u7ed3<\/p>\n
SSL\u8bc1\u4e66\u7684\u90e8\u7f72\u975e\u5e38\u91cd\u8981\uff0c\u5b83\u80fd\u591f\u4fdd\u62a4\u7f51\u7ad9\u7684\u6570\u636e\u4f20\u8f93\u5b89\u5168\u3002SSL\u8bc1\u4e66\u7684\u90e8\u7f72\u539f\u7406\u5f88\u7b80\u5355\uff0c\u5c31\u662f\u5728Web\u670d\u52a1\u5668\u4e0a\u5b89\u88c5SSL\u8bc1\u4e66\uff0c\u5e76\u914d\u7f6eWeb\u670d\u52a1\u5668\uff0c\u4f7f\u5176\u652f\u6301HTTPS\u534f\u8bae\u3002\u672c\u6587\u4ecb\u7ecd\u4e86SSL\u8bc1\u4e66\u7684\u90e8\u7f72\u539f\u7406\u548c\u5177\u4f53\u6b65\u9aa4\uff0c\u5e0c\u671b\u5bf9\u5927\u5bb6\u6709\u6240\u5e2e\u52a9\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"
SSL\u8bc1\u4e66\u662f\u4e00\u79cd\u6570\u5b57\u8bc1\u4e66\uff0c\u7528\u4e8e\u4fdd\u62a4\u7f51\u7ad9\u7684\u6570\u636e\u4f20\u8f93\u5b89\u5168\u3002SSL\u8bc1\u4e66\u7684\u7533\u8bf7\u662f\u4e00\u4e2a\u6bd4\u8f83\u7b80\u5355\u7684\u8fc7\u7a0b\uff0c\u4f46\u662f\u5bf9\u4e8e\u5f88\u591a\u7f51\u7ad9\u7ba1\u7406\u5458\u6765\u8bf4\uff0cSSL\u8bc1\u4e66\u7684\u90e8\u7f72\u53ef\u80fd\u662f\u4e00\u4e2a\u6bd4\u8f83\u56f0\u96be\u7684\u95ee\u9898\u3002\u672c\u6587\u5c06\u8be6\u7ec6\u4ecb\u7ecdSSL\u8bc1\u4e66\u7684\u90e8\u7f72\u539f\u7406\u548c<\/p>\n","protected":false},"author":16,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[15125,16,467,15116,30],"topic":[],"class_list":{"0":"post-8801","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"hentry","6":"category-sqssl","7":"tag-https","8":"tag-16","9":"tag-467","11":"tag-30"},"_links":{"self":[{"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/posts\/8801","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/users\/16"}],"replies":[{"embeddable":true,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/comments?post=8801"}],"version-history":[{"count":0,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/posts\/8801\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/media?parent=8801"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/categories?post=8801"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/tags?post=8801"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/topic?post=8801"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}