<\/figure>\n<\/p>\nmydomain.key -out mydomain.csr<\/p>\n
“`<\/p>\n
\u5728\u8fd9\u4e2a\u547d\u4ee4\u4e2d\uff0cmydomain.key\u662f\u60a8\u7684\u79c1\u94a5\u6587\u4ef6\u540d\uff0cmydomain.csr\u662f\u60a8\u7684CSR\u6587\u4ef6\u540d\u3002\u5728\u751f\u6210CSR\u65f6\uff0c\u60a8\u9700\u8981\u8f93\u5165\u4e00\u4e9b\u4fe1\u606f\uff0c\u5982\u56fd\u5bb6\u3001\u5dde\u3001\u57ce\u5e02\u3001\u7ec4\u7ec7\u540d\u79f0\u3001\u5355\u4f4d\u540d\u79f0\u548c\u7535\u5b50\u90ae\u4ef6\u5730\u5740\u7b49\u3002<\/p>\n
3. \u8d2d\u4e70SSL\u8bc1\u4e66<\/p>\n
\u5728\u751f\u6210CSR\u4e4b\u540e\uff0c\u60a8\u9700\u8981\u8d2d\u4e70SSL\u8bc1\u4e66\u3002\u60a8\u53ef\u4ee5\u5728\u4e00\u4e9b\u77e5\u540d\u7684\u8bc1\u4e66\u9881\u53d1\u673a\u6784\uff08\u5982Comodo\u3001Symantec\u548cGoDaddy\uff09\u8d2d\u4e70SSL\u8bc1\u4e66\u3002\u8d2d\u4e70\u8bc1\u4e66\u65f6\uff0c\u60a8\u9700\u8981\u5411\u8bc1\u4e66\u9881\u53d1\u673a\u6784\u63d0\u4f9b\u60a8\u7684CSR\u6587\u4ef6\u3002<\/p>\n
4. \u5b89\u88c5SSL\u8bc1\u4e66<\/p>\n
\u4e00\u65e6\u60a8\u4ece\u8bc1\u4e66\u9881\u53d1\u673a\u6784\u90a3\u91cc\u83b7\u5f97\u4e86SSL\u8bc1\u4e66\uff0c\u60a8\u9700\u8981\u5c06\u5176\u5b89\u88c5\u5230\u60a8\u7684\u670d\u52a1\u5668\u4e0a\u3002\u60a8\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u5b89\u88c5SSL\u8bc1\u4e66\uff1a<\/p>\n
“`<\/p>\n
sudo cp mydomain.crt \/etc\/pki\/tls\/certs\/<\/p>\n
sudo cp mydomain.key \/etc\/pki\/tls\/private\/<\/p>\n
sudo cp ca_bundle.crt \/etc\/pki\/tls\/certs\/<\/p>\n
“`<\/p>\n
\u5728\u8fd9\u4e2a\u547d\u4ee4\u4e2d\uff0cmydomain.crt\u662f\u60a8\u7684SSL\u8bc1\u4e66\u6587\u4ef6\u540d\uff0cca_bundle.crt\u662f\u60a8\u7684\u8bc1\u4e66\u9881\u53d1\u673a\u6784\u63d0\u4f9b\u7684\u4e2d\u95f4\u8bc1\u4e66\u3002<\/p>\n
5. \u914d\u7f6eApache\u670d\u52a1\u5668<\/p>\n
\u6700\u540e\uff0c\u60a8\u9700\u8981\u914d\u7f6eApache\u670d\u52a1\u5668\u4ee5\u4f7f\u7528SSL\u8bc1\u4e66\u3002\u60a8\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u7f16\u8f91Apache\u7684\u914d\u7f6e\u6587\u4ef6\uff1a<\/p>\n
“`<\/p>\n
sudo nano \/etc\/httpd\/conf.d\/ssl.conf<\/p>\n
“`<\/p>\n
\u5728\u8fd9\u4e2a\u6587\u4ef6\u4e2d\uff0c\u60a8\u9700\u8981\u627e\u5230\u4ee5\u4e0b\u884c\uff0c\u5e76\u5c06\u5176\u53d6\u6d88\u6ce8\u91ca\uff1a<\/p>\n
“`<\/p>\n
SSLCertificateFile \/etc\/pki\/tls\/certs\/mydomain.crt<\/p>\n
SSLCertificateKeyFile \/etc\/pki\/tls\/private\/mydomain.key<\/p>\n
SSLCACertificateFile \/etc\/pki\/tls\/certs\/ca_bundle.crt<\/p>\n
“`<\/p>\n
6. \u91cd\u542fApache\u670d\u52a1\u5668<\/p>\n
\u5b8c\u6210\u4e0a\u8ff0\u6b65\u9aa4\u540e\uff0c\u60a8\u9700\u8981\u91cd\u542fApache\u670d\u52a1\u5668\u4ee5\u4f7f\u66f4\u6539\u751f\u6548\u3002\u60a8\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u91cd\u542fApache\u670d\u52a1\u5668\uff1a<\/p>\n
“`<\/p>\n
sudo systemctl restart httpd.service<\/p>\n
“`<\/p>\n
\u4e09\u3001\u603b\u7ed3<\/p>\n
\u5728\u672c\u7bc7\u6587\u7ae0\u4e2d\uff0c\u6211\u4eec\u4ecb\u7ecd\u4e86\u5728CentOS 7\u4e0a\u7533\u8bf7SSL\u8bc1\u4e66\u7684\u6b65\u9aa4\u3002\u8fd9\u4e9b\u6b65\u9aa4\u5305\u62ec\u5b89\u88c5Apache\u548cmod_ssl\u6a21\u5757\u3001\u751f\u6210\u79c1\u94a5\u548cCSR\u3001\u8d2d\u4e70SSL\u8bc1\u4e66\u3001\u5b89\u88c5SSL\u8bc1\u4e66\u3001\u914d\u7f6eApache\u670d\u52a1\u5668\u548c\u91cd\u542fApache\u670d\u52a1\u5668\u3002\u901a\u8fc7\u8fd9\u4e9b\u6b65\u9aa4\uff0c\u60a8\u53ef\u4ee5\u5728\u60a8\u7684\u7f51\u7ad9\u4e0a\u4f7f\u7528SSL\u8bc1\u4e66\uff0c\u786e\u4fdd\u60a8\u7684\u7f51\u7ad9\u6570\u636e\u7684\u5b89\u5168\u6027\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"
\u5728\u4e92\u8054\u7f51\u9886\u57df\uff0cSSL\u8bc1\u4e66\u662f\u4fdd\u8bc1\u7f51\u7ad9\u5b89\u5168\u7684\u91cd\u8981\u5de5\u5177\u4e4b\u4e00\u3002CentOS 7\u662f\u4e00\u79cd\u5e7f\u6cdb\u4f7f\u7528\u7684Linux\u64cd\u4f5c\u7cfb\u7edf\uff0c\u5b83\u7684\u5b89\u5168\u6027\u975e\u5e38\u9ad8\u3002\u5728\u672c\u7bc7\u6587\u7ae0\u4e2d\uff0c\u6211\u4eec\u5c06\u8be6\u7ec6\u4ecb\u7ecd\u5982\u4f55\u5728CentOS 7\u4e0a\u7533\u8bf7SSL\u8bc1\u4e66\u3002\u4e00\u3001S<\/p>\n","protected":false},"author":19,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[19067,19066,105,334,30],"topic":[],"class_list":["post-14999","post","type-post","status-publish","format-standard","hentry","category-sqssl","tag-https-","tag-javahttps","tag-105","tag-334","tag-30"],"_links":{"self":[{"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/posts\/14999","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\/19"}],"replies":[{"embeddable":true,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/comments?post=14999"}],"version-history":[{"count":1,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/posts\/14999\/revisions"}],"predecessor-version":[{"id":15022,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/posts\/14999\/revisions\/15022"}],"wp:attachment":[{"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/media?parent=14999"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/categories?post=14999"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/tags?post=14999"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/topic?post=14999"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}