{"id":324,"date":"2022-11-25T15:23:38","date_gmt":"2022-11-25T07:23:38","guid":{"rendered":"https:\/\/app.applebyme.cn\/cloud\/wwwinfo\/324.html"},"modified":"2022-11-25T15:23:38","modified_gmt":"2022-11-25T07:23:38","slug":"apache-%e5%ae%89%e8%a3%85ssl%e8%af%81%e4%b9%a6-apache%e9%85%8d%e7%bd%aehttps%e8%af%81%e4%b9%a6","status":"publish","type":"post","link":"https:\/\/app.applebyme.cn\/cloud\/wwwinfo\/324.html","title":{"rendered":"Apache \u5b89\u88c5SSL\u8bc1\u4e66 Apache\u914d\u7f6ehttps\u8bc1\u4e66"},"content":{"rendered":"<p><strong><span class=\"wpcom_tag_link\">Apache<\/span> \u5b89\u88c5SSL\u8bc1\u4e66<\/strong><br \/>1.\u4e0b\u8f7dSSL\u8bc1\u4e66\u5e76\u4e0a\u4f20\u5230\u670d\u52a1\u5668<\/p>\n<pre class=\"wp-block-code\"><code>yourdomain.com.crt     (\u670d<a href=\"https:\/\/app.applebyme.cn\/shengcheng-17.html\">\u7f51\u9875\u751f\u6210APP<\/a>\u52a1\u5668\u8bc1\u4e66)\nyourdomain.com.key     (\u79c1\u94a5\u6587\u4ef6\uff09\u5982\u679c\u4e3a\u7a7a\u8bf7\u5c06\u751f\u6210CSR\u65f6\u4fdd\u5b58\u7684\u79c1\u94a5\u5185\u5bb9\u7c98\u8d34\u5728\u6587\u4ef6\u4e2d\nca-bundle.crt          (\u6839\u8bc1\u4e66\u94fe\uff09<\/code><\/pre>\n<p>2.\u67e5\u627eApache\u914d\u7f6e\u6587\u4ef6\u5e76\u7f16\u8f91<br \/>\u7531\u4e8e\u4e0d\u540c\u670d\u52a1\u5668\u914d\u7f6e\u6587\u4ef6\u8def\u5f84\u4e0d\u540c\uff0c\u8bf7\u8054\u7cfb\u670d\u52a1\u5668\u7ba1\u7406\u5458\u534f\u52a9\u5b89\u88c5.<br \/>Apache\u7684\u4e3b\u914d\u7f6e\u6587\u4ef6\u901a\u5e38\u547d\u540d\u4e3ahttpd.conf\u6216apache2.conf . \u5982\u679c\u4f7f\u7528yum\/apt-get\u5b89\u88c5\uff0c\u8be5\u6587\u4ef6\u901a\u5e38\u653e\u5728 \/etc\/httpd\u00a0\u00a0|\u00a0\u00a0\/etc\/apache2 \u4e0b\u9762<\/p>\n<p>3.\u914d\u7f6eSSL\uff08HTTPS\uff09\u7ad9\u70b9<\/p>\n<pre class=\"wp-block-code\"><code>#\u5982\u679c\u914d\u7f6e\u5df2\u7ecf\u5b58\u5728\u5c31\u4e0d\u8981\u52a0\nListen 443\n#\u5982\u679c\u914d\u7f6e\u5df2\u7ecf\u5b58\u5728\u5c31\u4e0d\u8981\u52a0\nLoadModule ssl_module modules\/mod_ssl.so\n#\u975e\u5fc5\u987b\uff0c\u914d\u7f6e\u591a\u4e2aSSL\u7ad9\u70b9\u4f1a\u9700\u8981\nNameVirtualHost *:443\n<a href=\"https:\/\/app.applebyme.cn\/shengcheng-94.html\">\u7f51\u7ad9\u751f\u6210app\u8f6f\u4ef6<\/a>&lt;VirtualHost *:443&gt;\nServerName www.yimenapp.cn\nServerAlias yimenapp.cn\nDocumentRoot \/var\/www\/html\nSSLEngine on\nSSLProtocol all -SSLv2 -SSLv3\nSSLCertificateFile \/etc\/ssl\/yourdomain.com.crt \nSSLCertificateKeyFile \/etc\/ssl\/yourdomain.com.key \nSSLCertificateChainFile \/etc\/ssl\/yourdomain.com.ca-bundle  #2.4+\u7248\u672c\u4e0d\u9700\u8981\u6b64\u53c2\u6570\uff0c\u8bf7\u4f7f\u7528nginx\u683c\u5f0f\u5b89\u88c5\n&lt;\/VirtualHost&gt;<\/code><\/pre>\n<p>Apache\u53c2\u6570\u5bf9\u5e94\u4f60\u7684\u8bc1\u4e66\u540d\u79f0:<\/p>\n<ul>\n<li>SSLCertificateFile\u00a0 \u00a0\u00a0 \u00a0\u00a0 \u00a0\u00a0 \u00a0\u670d\u52a1\u5668\u8bc1\u4e66 (\u4f8b\u5982. yourdomain.com.crt)<\/li>\n<li>SSLCertificateKeyFile\u00a0 \u00a0\u00a0 \u00a0\u00a0 \u00a0\u8bc1\u4e66\u7684\u79c1\u94a5\u6587\u4ef6\uff0c\u751f\u6210CSR\u65f6\u4ea7\u751f \uff08\u4f8b\u5982. yourdomain.com.key\uff09<\/li>\n<li>SSLCertificateChainFile\u00a0 \u00a0\u00a0 \u00a0 \u7b7e\u53d1\u673a\u6784\u7684\u4e2d\u7ea7\u8bc1\u4e66\u548c\u6839\u8bc1\u4e66\uff0c\u4ece\u6211\u4eec\u516c\u53f8\u8d2d\u4e70\u7684\u8bc1\u4e66\u4f1a\u63d0\u4f9b\u8fd9\u4e2a\u6587\u4ef6 (\u5982. ca-bundle.crt)<\/li>\n<li>4.\u6d4b\u8bd5\u914d\u7f6e\u6587\u4ef6\u662f\u5426\u6b63\u786e<\/li>\n<\/ul>\n<pre class=\"wp-block-code\"><code>apachectl configtest<\/code><\/pre>\n<p>5.\u91cd\u542fApache\u4f7f\u5176\u751f\u6548<\/p>\n<pre class=\"wp-block-code\"><code>apachectl restart<\/code><\/pre>\n<div class=\"entry-copyright\">\n<p>\u7f16\u8f91\uff1a\u5a1c\u5a1c\uff0c\u5982\u82e5\u8f6c\u8f7d\uff0c\u8bf7\u6ce8\u660e\u51fa\u5904\uff1ahttps:\/\/www.yimenapp.com\/kb-yimen\/4930\/<\/p>\n<p>\u90e8\u5206\u5185\u5bb9\u6765\u81ea\u7f51\u7edc\u6295\u7a3f\uff0c\u5982\u6709\u4fb5\u6743\u8054\u7cfb\u7acb\u5220<\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Apache\u7684\u4e3b\u914d\u7f6e\u6587\u4ef6\u901a\u5e38\u547d\u540d\u4e3ahttpd.conf\u6216apache2.conf . \u5982\u679c\u4f7f\u7528yum\/apt-get\u5b89\u88c5\uff0c\u8be5\u6587\u4ef6\u901a\u5e38\u653e\u5728 \/etc\/httpd\u00a0\u00a0|\u00a0\u00a0\/etc\/apache2 \u4e0b\u9762<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[706,708,737,181,696],"class_list":["post-324","post","type-post","status-publish","format-standard","hentry","category-wwwinfo","tag-apache","tag-apachessl","tag-apachehttps","tag-ssl"],"_links":{"self":[{"href":"https:\/\/app.applebyme.cn\/cloud\/wp-json\/wp\/v2\/posts\/324","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/app.applebyme.cn\/cloud\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/app.applebyme.cn\/cloud\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/app.applebyme.cn\/cloud\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/app.applebyme.cn\/cloud\/wp-json\/wp\/v2\/comments?post=324"}],"version-history":[{"count":0,"href":"https:\/\/app.applebyme.cn\/cloud\/wp-json\/wp\/v2\/posts\/324\/revisions"}],"wp:attachment":[{"href":"https:\/\/app.applebyme.cn\/cloud\/wp-json\/wp\/v2\/media?parent=324"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/app.applebyme.cn\/cloud\/wp-json\/wp\/v2\/categories?post=324"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/app.applebyme.cn\/cloud\/wp-json\/wp\/v2\/tags?post=324"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}