{"id":48144,"date":"2023-05-06T21:59:38","date_gmt":"2023-05-06T13:59:38","guid":{"rendered":"http:\/\/lrxjmw.cn\/?p=48144"},"modified":"2023-05-06T21:59:38","modified_gmt":"2023-05-06T13:59:38","slug":"apache-openssl1","status":"publish","type":"post","link":"https:\/\/lrxjmw.cn\/apache-openssl1.html","title":{"rendered":"Apache,dovecot\u4e0bOpenssl\u5e94\u7528\u4e00"},"content":{"rendered":"
\u5bfc\u8bfb<\/td>\n | \u8fd9\u4e48\u957f\u65f6\u95f4\u4e4b\u540e\uff0c\u6211\u7684\u8bfb\u8005\u4eec\uff0c\u8fd9\u91cc\u662f\u6211\u7ed9\u4f60\u4eec\u627f\u8bfa\u7684\u5728 Apache \u4e2d\u4f7f\u7528 OpenSSL \u7684\u65b9\u6cd5\uff0c\u4e0b\u5468\u4f60\u4f1a\u770b\u5230\u5728 Dovecot \u4e2d\u4f7f\u7528 SSL\u3002 \u5728\u8fd9\u4e2a\u5206\u4e3a\u4e24\u90e8\u5206\u7684\u7cfb\u5217\u4e2d\uff0c\u6211\u4eec\u5c06\u5b66\u4e60\u5982\u4f55\u521b\u5efa\u81ea\u5df1\u7684 OpenSSL \u8bc1\u4e66\uff0c\u4ee5\u53ca\u5982\u4f55\u914d\u7f6e Apache \u548c Dovecot \u6765\u4f7f\u7528\u5b83\u4eec\u3002<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n <\/p>\n \u521b\u5efa\u4f60\u7684\u8bc1\u4e66<\/strong><\/div>\n Debian\/Ubuntu\/Mint \u4f1a\u5728 \/etc\/ssl<\/span> \u4e2d\u5b58\u50a8\u79c1\u94a5\u548c\u8bc1\u4e66\u7684\u7b26\u53f7\u94fe\u63a5\u3002\u7cfb\u7edf\u81ea\u5e26\u7684\u8bc1\u4e66\u4fdd\u5b58\u5728\/usr\/share\/ca-certificates<\/span> \u4e2d\u3002\u4f60\u5b89\u88c5\u6216\u521b\u5efa\u7684\u8bc1\u4e66\u5728 \/usr\/local\/share\/ca-certificates\/<\/span> \u4e2d\u3002<\/p>\n \u8fd9\u4e2a\u4f8b\u5b50\u662f\u5bf9 Debian \u800c\u8a00\u3002\u521b\u5efa\u79c1\u94a5\u548c\u516c\u7528\u8bc1\u4e66\uff0c\u5c06\u8bc1\u4e66\u8f6c\u6362\u4e3a\u6b63\u786e\u7684\u683c\u5f0f\uff0c\u5e76\u5c06\u5176\u7b26\u53f7\u94fe\u63a5\u5230\u6b63\u786e\u7684\u76ee\u5f55\uff1a<\/p>\n CentOS\/Fedora \u4f7f\u7528\u4e0d\u540c\u7684\u6587\u4ef6\u7ed3\u6784\uff0c\u5e76\u4e0d\u4f7f\u7528 update-ca-certificates<\/span>\uff0c\u4f7f\u7528\u8fd9\u4e2a\u547d\u4ee4\uff1a<\/p>\n \u6700\u91cd\u8981\u7684\u6761\u76ee\u662f Common Name<\/span>\uff0c\u5b83\u5fc5\u987b\u4e0e\u4f60\u7684\u5b8c\u5168\u9650\u5b9a\u57df\u540d\uff08FQDN\uff09\u5b8c\u5168\u5339\u914d\u3002\u6b64\u5916\u5176\u5b83\u4fe1\u606f\u90fd\u662f\u4efb\u610f\u7684\u3002-nodes<\/span> \u7528\u4e8e\u521b\u5efa\u4e00\u4e2a\u65e0\u5bc6\u7801\u7684\u8bc1\u4e66\uff0c\u8fd9\u662f Apache \u6240\u5fc5\u9700\u7684\u3002-days<\/span> \u7528\u4e8e\u5b9a\u4e49\u8fc7\u671f\u65e5\u671f\u3002\u66f4\u65b0\u8bc1\u4e66\u662f\u4e00\u4e2a\u9ebb\u70e6\u7684\u4e8b\u60c5\uff0c\u4f46\u8fd9\u6837\u5e94\u8be5\u80fd\u591f\u989d\u5916\u63d0\u4f9b\u4e00\u4e9b\u5b89\u5168\u4fdd\u969c\u3002<\/p>\n \u73b0\u5728\u914d\u7f6e Apache \u4ee5\u4f7f\u7528\u4f60\u7684\u65b0\u8bc1\u4e66\u3002\u5982\u679c\u4f60\u9075\u5faa\u7ed9\u521d\u5b66\u8005\u770b\u7684\u5728 Ubuntu Linux \u4e0a\u4f7f\u7528 Apache\uff1a\u7b2c 2 \u90e8\u5206\uff0c\u4f60\u6240\u8981\u505a\u7684\u5c31\u662f\u4fee\u6539\u865a\u62df\u4e3b\u673a\u914d\u7f6e\u4e2d\u7684 SSLCertificateFile<\/span> \u548c SSLCertificateKeyFile<\/span>\uff0c\u4ee5\u6307\u5411\u4f60\u7684\u65b0\u79c1\u94a5\u548c\u516c\u5171\u8bc1\u4e66\u3002\u6765\u81ea\u8be5\u6559\u7a0b\u4e2d\u7684 test.com<\/span> \u793a\u4f8b\u73b0\u5728\u770b\u8d77\u6765\u50cf\u8fd9\u6837\uff1a<\/p>\n CentOS \u7528\u6237\uff0c\u8bf7\u53c2\u9605\u5728 CentOS wiki \u4e2d\u7684\u5728 CentOS \u4e0a\u8bbe\u7f6e SSL \u52a0\u5bc6\u7684 Web \u670d\u52a1\u5668\u4e00\u6587\u3002\u8fc7\u7a0b\u662f\u7c7b\u4f3c\u7684\uff0cwiki \u4f1a\u544a\u8bc9\u5982\u4f55\u5904\u7406 SELinux\u3002<\/p>\n \u4e00\u4e2a\u7b80\u5355\u7684\u65b9\u6cd5\u662f\u7528\u4f60\u7684\u7f51\u7edc\u6d4f\u89c8\u5668\u8bbf\u95ee https:\/\/yoursite.com\uff0c\u770b\u770b\u5b83\u662f\u5426\u53ef\u4ee5\u6b63\u5e38\u5de5\u4f5c\u3002\u5728\u7b2c\u4e00\u6b21\u8fd9\u6837\u505a\u65f6\uff0c\u4f60\u4f1a\u5728\u4f60\u8fc7\u5ea6\u4fdd\u62a4\u7684 web \u6d4f\u89c8\u5668\u4e2d\u770b\u5230\u53ef\u6015\u7684\u8b66\u544a\u8bf4\u7f51\u7ad9\u662f\u4e0d\u5b89\u5168\u7684\uff0c\u56e0\u4e3a\u5b83\u4f7f\u7528\u7684\u662f\u81ea\u7b7e\u540d\u8bc1\u4e66\u3002\u8bf7\u5ffd\u7565\u4f60\u8fd9\u4e2a\u654f\u611f\u7684\u6d4f\u89c8\u5668\uff0c\u5e76\u5355\u51fb\u5c4f\u5e55\u521b\u5efa\u6c38\u4e45\u6027\u4f8b\u5916\u3002 \u5982\u679c\u4f60\u9075\u5faa\u5728\u7ed9\u521d\u5b66\u8005\u770b\u7684\u5728 Ubuntu Linux \u4e0a\u4f7f\u7528 Apache\uff1a\u7b2c 2 \u90e8\u5206\u4e0a\u7684\u793a\u4f8b\u865a\u62df\u4e3b\u673a\u914d\u7f6e\uff0c\u90a3\u4e48\u5373\u4f7f\u4f60\u7684\u7f51\u7ad9\u8bbf\u95ee\u8005\u5c1d\u8bd5\u4f7f\u7528\u7eaf HTTP\uff0c\u4f60\u7684\u7f51\u7ad9\u7684\u6240\u6709\u6d41\u91cf\u90fd\u5c06\u5f3a\u5236\u901a\u8fc7 HTTPS\u3002<\/p>\n \u4e00\u4e2a\u5f88\u597d\u6d4b\u8bd5\u65b9\u6cd5\u662f\u4f7f\u7528 OpenSSL\u3002\u662f\u7684\uff0c\u6709\u4e00\u4e2a\u6f02\u4eae\u7684\u547d\u4ee4\u6765\u6d4b\u8bd5\u8fd9\u4e9b\u4e1c\u897f\u3002\u8bd5\u4e0b\u8fd9\u4e2a\uff1a<\/p>\n \u8fd9\u91cc\u8f93\u51fa\u4e86\u5927\u91cf\u7684\u4fe1\u606f\u3002\u8fd9\u91cc\u6709\u5f88\u591a\u5173\u4e8e openssl s_client<\/span> \u7684\u6709\u8da3\u4fe1\u606f; \u73b0\u5728\u8db3\u591f\u6211\u4eec\u77e5\u9053\u6211\u4eec\u7684 web \u670d\u52a1\u5668\u662f\u5426\u4f7f\u7528\u4e86\u6b63\u786e\u7684 SSL \u8bc1\u4e66\u3002<\/p>\n \u5982\u679c\u4f60\u51b3\u5b9a\u4f7f\u7528\u7b2c\u4e09\u65b9\u8bc1\u4e66\u9881\u53d1\u673a\u6784\uff08CA\uff09\uff0c\u90a3\u4e48\u5c31\u5fc5\u987b\u521b\u5efa\u8bc1\u4e66\u7b7e\u540d\u8bf7\u6c42\uff08CSR\uff09\u3002\u4f60\u5c06\u5b83\u53d1\u9001\u7ed9\u4f60\u7684\u65b0 CA\uff0c\u4ed6\u4eec\u5c06\u7b7e\u7f72\u5e76\u5c06\u5176\u53d1\u9001\u7ed9\u60a8\u3002\u4ed6\u4eec\u53ef\u80fd\u5bf9\u521b\u5efa\u4f60\u7684 CSR \u6709\u81ea\u5df1\u7684\u8981\u6c42; \u8fd9\u662f\u5982\u4f55\u521b\u5efa\u4e00\u4e2a\u65b0\u7684\u79c1\u94a5\u548c CSR \u7684\u5178\u578b\u793a\u4f8b\uff1a<\/p>\n \u4f60\u4e5f\u53ef\u4ee5\u4ece\u4e00\u4e2a\u5df2\u7ecf\u5b58\u5728\u7684 key \u4e2d\u521b\u5efa\u4e00\u4e2a CSR\uff1a<\/p>\n \u4eca\u5929\u5c31\u662f\u8fd9\u6837\u4e86\u3002\u4e0b\u5468\u6211\u4eec\u5c06\u5b66\u4e60\u5982\u4f55\u6b63\u786e\u5730\u5728 Dovecot \u4e2d\u8bbe\u7f6e OpenSSL\u3002<\/p>\n via: https:\/\/www.linux.com\/learn\/sysadmin\/openssl-apache-and-dovecot<\/a><\/p>\n \u4f5c\u8005\uff1aCARLA SCHRODER<\/a> \u8bd1\u8005\uff1ageekpi<\/a> \u6821\u5bf9\uff1awxy<\/a><\/p>\n \u672c\u6587\u7531 LCTT<\/a> \u539f\u521b\u7f16\u8bd1\uff0cLinux\u4e2d\u56fd<\/a> \u8363\u8a89\u63a8\u51fa<\/p>\n \u539f\u6587\u6765\u81ea\uff1ahttps:\/\/linux.cn\/article-8167-1.html<\/a><\/p>\n |