{"id":6138,"date":"2020-03-30T00:45:40","date_gmt":"2020-03-29T16:45:40","guid":{"rendered":"http:\/\/www.orczhou.com\/?p=6138"},"modified":"2025-03-27T19:35:01","modified_gmt":"2025-03-27T11:35:01","slug":"httpd-wordpress-upgrade-to-https","status":"publish","type":"post","link":"https:\/\/www.orczhou.com\/index.php\/2020\/03\/httpd-wordpress-upgrade-to-https\/","title":{"rendered":"\u57fa\u4e8ehttpd\u7684wordpress\u7ad9\u70b9\u5347\u7ea7\u4e3ahttps"},"content":{"rendered":"\n\n\n\n<p>\u4ece2018\u5e74\u5f00\u59cb\uff0cChrome\u6d4f\u89c8\u5668\u4f1a\u5c06\u6240\u6709\u6ca1\u6709\u4f7f\u7528https\u52a0\u5bc6\u4f20\u8f93\u7684\u7ad9\u70b9\u90fd\u6807\u8bb0\u4e3a\u4e0d\u5b89\u5168\u7684\u3002\u4e2a\u4eba\u535a\u5ba2\u662f\u642d\u5efa\u5728httpd\u4e0a\uff0c\u4e00\u76f4\u6ca1\u6709\u5347\u7ea7\u5230https\uff0c\u6240\u4ee5\u4e5f\u4f1a\u6807\u8bb0\u4e3a\u201c\u4e0d\u5b89\u5168\u201d\u3002\u8fd9\u4e2a\u5468\u672b\uff0c\u82b1\u4e86\u51e0\u4e2a\u5c0f\u65f6\u201c\u6298\u817e\u201d\uff0c\u7ec8\u4e8e\u8ba9\u7ad9\u70b9\u53d8\u5f97\u201c\u5b89\u5168\u201d\u4e86\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image alignleft\"><a href=\"https:\/\/www.orczhou.com\/wp-content\/uploads\/2020\/03\/Snip20200329_1.png\" rel=\"attachment wp-att-6177\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"371\" src=\"https:\/\/www.orczhou.com\/wp-content\/uploads\/2020\/03\/Snip20200329_1-1024x371.png\" alt=\"Snip20200329_1\" class=\"wp-image-6177\" srcset=\"https:\/\/www.orczhou.com\/wp-content\/uploads\/2020\/03\/Snip20200329_1-1024x371.png 1024w, https:\/\/www.orczhou.com\/wp-content\/uploads\/2020\/03\/Snip20200329_1-300x109.png 300w, https:\/\/www.orczhou.com\/wp-content\/uploads\/2020\/03\/Snip20200329_1-768x278.png 768w, https:\/\/www.orczhou.com\/wp-content\/uploads\/2020\/03\/Snip20200329_1.png 1534w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<p>\u56e0\u4e3a\u8bc1\u4e66\u6709\u6548\u671f\u53ea\u6709\u4e09\u4e2a\u6708\uff0c\u6240\u4ee5\uff0c\u672c\u6587https\u7684\u57fa\u672c\u539f\u7406\u548c\u914d\u7f6e\u505a\u4e2a\u4ecb\u7ecd\u548c\u8bb0\u5f55\uff0c\u4fbf\u4e8e\u540e\u7eed\u6301\u7eed\u7ef4\u62a4\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u914d\u7f6e<\/h3>\n\n\n\n<p>\u9996\u5148\uff0c\u8bc1\u4e66\u673a\u6784\u9009\u62e9\u4e86<a href=\"https:\/\/letsencrypt.org\/\" target=\"_blank\" rel=\"noopener noreferrer\">Let&#8217;s Encrypt<\/a>\uff0c\u4f7f\u7528\u4e86\u5bf9\u5e94\u7684<a href=\"https:\/\/certbot.eff.org\/\" target=\"_blank\" rel=\"noopener noreferrer\">\u5f00\u6e90\u5de5\u5177certbot<\/a>\u751f\u6210\u79d8\u94a5\uff0c\u5e76\u83b7\u5f97\u8bc1\u4e66\u3002\u8be6\u7ec6\u7684\u4f7f\u7528\u65b9\u6cd5\u53c2\u8003\uff1a<a href=\"https:\/\/certbot.eff.org\/instructions\" target=\"_blank\" rel=\"noopener noreferrer\">certbot instructions<\/a>\u3002<\/p>\n\n\n\n<p>\u6211\u4f7f\u7528\u7684EC2\u7684Amazon Linux\uff0ccertbot\u5bf9\u8fd9\u4e2a\u53d1\u884c\u7248\u652f\u6301\u8fd8\u4e0d\u662f\u5f88\u597d\u3002\u6240\u4ee5\u6ca1\u6709\u4f7f\u7528\u5168\u81ea\u52a8\u7684\u914d\u7f6e\u65b9\u6cd5\uff0c\u800c\u662f\uff0c\u7528certbot\u751f\u6210\u79d8\u94a5\u3001\u8bc1\u4e66\u540e\uff0c\u518d\u624b\u52a8\u914d\u7f6ehttpd\u3002\u56e0\u4e3a\u8bc1\u4e66\u6709\u6548\u671f\u53ea\u6709\u4e09\u4e2a\u6708\uff0c\u6240\u4ee5\uff0c\u7ecf\u5e38\u9700\u8981\u8fc7\u6765\u624b\u52a8\u66f4\u65b0\u3002\u7b49\u4e0b\u4e2a\u5468\u672b\u518d\u6765\u7814\u7a76\u4e00\u4e0b\u662f\u5426\u53ef\u4ee5\u5b9e\u73b0\u5168\u81ea\u52a8\u914d\u7f6e\u3002<\/p>\n\n\n\n<!--more-->\n\n\n\n<figure class=\"wp-block-image alignleft\"><a href=\"http:\/\/www.orczhou.com\/wp-content\/uploads\/2020\/03\/Snip20200328_3.png\" rel=\"attachment wp-att-6171\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"139\" src=\"http:\/\/www.orczhou.com\/wp-content\/uploads\/2020\/03\/Snip20200328_3-1024x139.png\" alt=\"Snip20200328_3\" class=\"wp-image-6171\" srcset=\"https:\/\/www.orczhou.com\/wp-content\/uploads\/2020\/03\/Snip20200328_3-1024x139.png 1024w, https:\/\/www.orczhou.com\/wp-content\/uploads\/2020\/03\/Snip20200328_3-300x41.png 300w, https:\/\/www.orczhou.com\/wp-content\/uploads\/2020\/03\/Snip20200328_3-768x104.png 768w, https:\/\/www.orczhou.com\/wp-content\/uploads\/2020\/03\/Snip20200328_3.png 1826w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<p>\u5728<a href=\"https:\/\/certbot.eff.org\/instructions\" target=\"_blank\" rel=\"noopener noreferrer\">certbot instructions<\/a>\u9875\u9762\u4e0a\u6709\u975e\u5e38\u8be6\u7ec6\u7684\u8bf4\u660e\uff0c\u57fa\u672c\u4e0a\u53ef\u4ee5step by step\u7684\u5b8c\u6210\u914d\u7f6e\u3002\u8fd9\u91cc\u8bb0\u5f55\u4e00\u4e0b\u914d\u7f6e\u8fc7\u7a0b\u4e2d\u7684\u5f02\u5e38\u70b9\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">\u5173\u4e8eLinux\u53d1\u884c\u7248<\/h4>\n\n\n\n<p>\u7b2c\u4e00\u4e2a\u4e0e\u201c<a href=\"https:\/\/certbot.eff.org\/instructions\" target=\"_blank\" rel=\"noopener noreferrer\">instructions<\/a>\u201d\u4e0d\u4e00\u6837\u7684\u662f\uff1aEC2\u4f7f\u7528Amazon Linux\u53d1\u884c\u7248\u5e76\u4e0d\u5728\u9875\u9762\u4e0a\u7684OS\u652f\u6301\u5217\u8868\u4e2d\uff0c\u6839\u636e\u4f7f\u7528\u4e60\u60ef\u5e94\u8be5\u8fd9RedHat\u7cfb\u5217\u7684\u7cfb\u7edf\uff08\u4f7f\u7528\u4e0a\u90fd\u662f\u6309\u7167RedHat\u6216\u8005CentOS\u65b9\u5f0f\uff09\uff0cLinux\u5185\u6838\u662f4.19\u521d\u6b65\u5224\u65ad\u662fCentOS 7\u6216\u80058\u7248\u672c\u3002\u4e8e\u662f\u8bd5\u63a2\u6027\u7684\u6309\u7167CentOS 7\u8fdb\u884c\u914d\u7f6e\u3002<\/p>\n\n\n\n<p>\u7b2c\u4e8c\u4e2a\u4e0e\u201c<a href=\"https:\/\/certbot.eff.org\/instructions\" target=\"_blank\" rel=\"noopener noreferrer\">instructions<\/a>\u201d\u4e0d\u4e00\u6837\u7684\u662f\uff1a\u5728\u5b89\u88c5\u8fc7\u7a0b\u4e2d\uff0c\u4f1a\u56e0\u4e3a\u7f3a\u5c11augeas\u5305\u800c\u6267\u884c\u62a5\u9519\uff0c\u800c\u5b89\u88c5\u8fd9\u4e2a\u5305\uff0c\u9700\u8981\u4f7f\u7528<a href=\"https:\/\/fedoraproject.org\/wiki\/EPEL\" target=\"_blank\" rel=\"noopener noreferrer\">EPEL<\/a>\u6e90\uff0c\u5bf9\u4e8eEC2\u53ef\u4ee5\u53c2\u8003\u5982\u4e0b\u9875\u9762\u542f\u7528EPEL\uff1a<a href=\"https:\/\/amazonaws-china.com\/premiumsupport\/knowledge-center\/ec2-enable-epel\/?nc1=h_ls\" target=\"_blank\" rel=\"noopener noreferrer\">How do I enable the EPEL repository for my Amazon EC2 instance running CentOS, RHEL, or Amazon Linux?<\/a>\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">\u4f7f\u7528certbot\u751f\u6210\u8bc1\u4e66\u4e0e\u79d8\u94a5<\/h4>\n\n\n\n<p>\u63a5\u7740\uff0c\u53c2\u8003<a href=\"https:\/\/certbot.eff.org\/instructions\" target=\"_blank\" rel=\"noopener noreferrer\">instructions<\/a>\uff0c\u4f7f\u7528certbot\u547d\u4ee4\u884c\u5de5\u5177\u751f\u6210\u8bc1\u4e66\u4e0e\u79d8\u94a5\u3002\u8fc7\u7a0b\u4e2d\u9700\u8981\u8f93\u5165\u7ad9\u70b9\u7684\u57df\u540d\u548c\u7ba1\u7406\u5458\u7684\u90ae\u4ef6\u5730\u5740\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">$ sudo \/usr\/local\/bin\/certbot-auto certonly --apache \nSaving .... \nEnter email address ... (Enter 'c' to cancel): xxxxxxxx@gmail.com \nPlease read the Terms of Service at ...... \n(A)gree\/(C)ancel: A \nWould you be willing to share your email address with the Electronic Frontier Foundation, ...... \n(Y)es\/(N)o: Y \nWhich names would you like to activate HTTPS for? \n- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \n1: www.orczhou.com \n- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \nSelect the appropriate numbers separated by commas and\/or spaces, \nor leave input blank to select all options shown \n(Enter 'c' to cancel): 1 \n...... \nIMPORTANT NOTES: - Congratulations! \n...<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">\u914d\u7f6eapache\u7684httpd<\/h4>\n\n\n\n<p>\u914d\u7f6e\u7ad9\u70b9\u7684https\u8bbf\u95ee\uff0c\u9700\u8981\u6307\u5b9a\u6570\u636e\u8bc1\u4e66\u6587\u4ef6\u4e0e\u79c1\u94a5\u6587\u4ef6\uff0c\u5177\u4f53\u5982\u4e0b<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"apacheconf\" class=\"language-apacheconf\">&lt;VirtualHost _default_:443&gt;\n# General setup for the virtual host, inherited from global configuration \n# DocumentRoot \"\/var\/www\/html\" \nDocumentRoot \"\/var\/www\/orczhou.com\" \nServerName www.orczhou.com:443 \nSSLCertificateFile \/etc\/httpd\/conf\/server.crt \nSSLCertificateKeyFile \/etc\/httpd\/conf\/server.key<\/code><\/pre>\n\n\n\n<p>\u8fd8\u9700\u8981\u5c06\u539f\u676580\u7aef\u53e3\u7684\u8bf7\u6c42\u5168\u90e8\u8f6c\u53d1\u5230https\u8bf7\u6c42\u4e0b\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code class=\"\">&lt;VirtualHost *:80&gt;\n...... \nServerName www.orczhou.com Redirect permanent \/ https:\/\/www.orczhou.com\/ \n......<\/code><\/pre>\n\n\n\n<p>\u7136\u540e\u91cd\u542fhttpd\u5c31\u53ef\u4ee5\u4e86\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">wordpress\u7684\u4e00\u4e9b\u914d\u7f6e\u6539\u52a8<\/h4>\n\n\n\n<p>\u5728Wordpress\u540e\u53f0\u5c06\u201cWordPress\u5730\u5740\uff08URL\uff09\u201d\u548c\u201c\u7ad9\u70b9\u5730\u5740\uff08URL\uff09\u201d\u4fee\u6539\u4e3a\u201c https:\/\/www.orczhou.com \u201d \uff0c\u4fee\u6539\u5730\u70b9\u4e3a\uff1a\u201c\u8bbe\u7f6e-&gt;\u5e38\u89c4\u201d\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u6982\u8ff0https\u539f\u7406<\/h3>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-28f84493 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<p>\u5728\u6587\u7ae0\u201c<a href=\"https:\/\/tiptopsecurity.com\/how-does-https-work-rsa-encryption-explained\/\" target=\"_blank\" rel=\"noreferrer noopener\">How Does HTTPS Work? RSA Encryption Explained<\/a>\u201d\u4e2d\u6709\u8f83\u4e3a\u8be6\u7ec6\u7684\u63cf\u8ff0\u3002\u8fd9\u91cc\u7ed3\u5408\u672c\u7f51\u7ad9\u7684\u8bc1\u4e66\u4fe1\u606f\u505a\u4e00\u4e2a\u6982\u8ff0\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">\u6982\u8ff0https\u901a\u4fe1\u8fc7\u7a0b<\/h4>\n\n\n\n<p>\u5728\u7528\u6237\u4f7f\u7528\u81ea\u5df1\u6d4f\u89c8\u5668\uff08\u5ba2\u6237\u7aef\uff09\u8bbf\u95ee\u7f51\u7ad9www.orczhou.com:443\u7684\u65f6\u5019\uff0c\u670d\u52a1\u7aef\u7684httpd\u670d\u52a1\u4f1a\u5148\u5c06\u7ad9\u70b9\u7684\u516c\u94a5\u53d1\u9001\u7ed9\u5ba2\u6237\u7aef\u3002<\/p>\n\n\n\n<p>\u5ba2\u6237\u7aef\uff08\u901a\u5e38\u662f\u6d4f\u89c8\u5668\uff09\u4f1a\u81ea\u5df1\u968f\u673a\u751f\u6210\u4e00\u4e2asession key\uff08\u7528\u4e8e\u901a\u4fe1\u8fc7\u7a0b\u4e2d\u7684\u5bf9\u79f0\u52a0\u5bc6\uff09\uff0c\u5e76\u4f7f\u7528\u521a\u521a\u83b7\u5f97\u516c\u94a5\u5bf9session key\u8fdb\u884c\u52a0\u5bc6\uff0c\u518d\u53d1\u9001\u7ed9\u670d\u52a1\u7aef\u3002<\/p>\n\n\n\n<p>\u670d\u52a1\u7aef\u518d\u5229\u7528\u79c1\u94a5\u5bf9\u52a0\u5bc6\u540e\u7684session key\u7f16\u7801\u8fdb\u884c\u89e3\u5bc6\u540e\uff0c\u5c31\u53ef\u4ee5\u83b7\u5f97\u5bf9\u5e94\u7684session key\u3002<\/p>\n\n\n\n<p>\u7136\u540e\uff0c\u5ba2\u6237\u7aef\u548c\u670d\u52a1\u7aef\u6240\u6709\u7684\u901a\u4fe1\u5185\u5bb9\u90fd\u901a\u8fc7session key\u8fdb\u884c\u5bf9\u79f0\u52a0\u5bc6\u3002<\/p>\n\n\n\n<p>\u4e3a\u4ec0\u4e48\u8981\u7528session key\u800c\u4e0d\u662f\u516c\u94a5\u76f4\u63a5\u52a0\u5bc6\u5462\uff1f \u731c\u6d4b\u7684\u539f\u56e0\u5e94\u8be5\u662fRSA\u52a0\u5bc6\/\u89e3\u5bc6\u7684\u6210\u672c\u90fd\u592a\u9ad8\u4e86\uff0c\u4f1a\u8f83\u5927\u7a0b\u5ea6\u7684\u964d\u4f4e\u5ba2\u6237\u7aef\u548c\u670d\u52a1\u5668\u7684\u6027\u80fd\u3002<\/p>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/www.orczhou.com\/wp-content\/uploads\/2020\/03\/How-HTTPS-Works.png\" alt=\"\"\/><\/figure>\n<\/div>\n<\/div>\n\n\n\n<h4 class=\"wp-block-heading\">\u6982\u8ff0\u6570\u5b57\u8bc1\u4e66<\/h4>\n\n\n\n<p>\u8fd9\u6837\u901a\u4fe1\u8fc7\u7a0b\u4e2d\u7684\u4fe1\u606f\u90fd\u662f\u52a0\u5bc6\u597d\u7684\uff0c\u5373\u4fbf\u622a\u83b7\u901a\u4fe1\u4fe1\u606f\u4e5f\u4e0d\u77e5\u9053\u91cc\u9762\u7684\u5185\u5bb9\u662f\u4ec0\u4e48\uff0c\u4e00\u5207\u90fd\u770b\u8d77\u6765\u6bd4\u8f83\u5b8c\u7f8e\u3002\u4f46\u662f\uff0c\u8fd9\u79cd\u901a\u4fe1\u65b9\u5f0f\u5f88\u5bb9\u6613\u88ab\u4e2d\u95f4\u4eba\u653b\u51fb\u3002\u7b80\u5355\u6765\u8bf4\uff0c\u4e2d\u95f4\u4eba\u5728\u83b7\u5f97\u5ba2\u6237\u7aef\u8bf7\u6c42\u65f6\uff0c\u5047\u88c5\u81ea\u5df1\u662f\u670d\u52a1\u7aef\uff0c\u8fd4\u56de\u4e00\u4e2a\u5047\u7684\u516c\u94a5\uff08\u4e2d\u95f4\u4eba\u7684\u516c\u94a5\uff09\uff0c\u7136\u540e\u4e2d\u95f4\u4eba\u518d\u4f2a\u88c5\u6210\u5ba2\u6237\u7aef\u4e0e\u771f\u6b63\u7684\u670d\u52a1\u7aef\u901a\u4fe1\uff0c\u5c31\u8fd9\u6837\u5b8c\u6210\u6574\u4e2a\u4f1a\u8bdd\u3002\u8fd9\u79cd\u60c5\u51b5\u4e0b\uff0c\u5ba2\u6237\u7aef\u53ef\u80fd\u5c06\u91cd\u8981\u4fe1\u606f\u90fd\u53d1\u9001\u7ed9\u4e2d\u95f4\u4eba\u4e86\u3002<\/p>\n\n\n\n<p>\u8981\u89e3\u51b3\u4e2d\u95f4\u4eba\u653b\u51fb\uff0c\u9700\u8981\u518d\u5f15\u5165\u4e00\u4e2a\u7b2c\u4e09\u65b9\u201c\u6743\u5a01\u673a\u6784\u201d\u6765\u8bc1\u660e\u5ba2\u6237\u7aef\u6536\u5230\u7684\u516c\u94a5\u771f\u7684\u662f\u5c5e\u4e8e\u670d\u52a1\u7aef\u7684\u3002\u5728\u8fd9\u91cc\uff0c\u4e5f\u5c31\u662f\u8bf4\u8bbf\u95eewww.orczhou.com\u7f51\u7ad9\u7684\u5ba2\u6237\u7aef\u9700\u8981\u786e\u8ba4\uff0c\u6536\u5230\u7684\u516c\u94a5\u771f\u7684\u662f\u5c5e\u4e8ewww.orczhou.com\u6240\u5728httpd\u670d\u52a1\u7aef\u3002\u8fd9\u91cc\u7684\u505a\u6cd5\u662f\uff0c\u5728\u53d1\u9001\u516c\u94a5\u7684\u65f6\u5019\uff0c\u4e0d\u4ec5\u4ec5\u662f\u53d1\u9001\u4e00\u4e2a\u516c\u94a5\uff0c\u800c\u662f\u53d1\u9001\u4e00\u4e2a\u5e26\u6570\u5b57\u7b7e\u540d\u7684\u6570\u5b57\u8bc1\u4e66\u3002\u7b7e\u540d\u7531\u4e13\u95e8\u7684\u201c<a href=\"https:\/\/en.wikipedia.org\/wiki\/Certificate_authority#CA_compromise\" target=\"_blank\" rel=\"noreferrer noopener\">\u8ba4\u8bc1\u673a\u6784<\/a>\u201d\u9881\u53d1\u3002<\/p>\n\n\n\n<p>\u4f8b\u5982\uff0c\u8be5\u7f51\u7ad9\uff08www.orczhou.com\uff09\u7684\u8bc1\u4e66\u5185\u5bb9\u5982\u4e0b\uff1a<\/p>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-28f84493 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<p>\u8bc1\u4e66\u4e2d\u5305\u542b\u4e86\u8ba4\u8bc1\u7ad9\u70b9\u7684\u57fa\u672c\u5185\u5bb9\uff0c\u5305\u62ec\u7ad9\u70b9\u57df\u540d\u3001\u6709\u6548\u671f\u3001\u7ad9\u70b9\u516c\u94a5\u3001CA\uff08\u8ba4\u8bc1\u673a\u6784\uff09\u7b7e\u540d\u7b49\u3002\u5177\u4f53\u7684\uff0c\u7ad9\u70b9\u516c\u94a5\u662f\u5185\u5bb9\u5982\u4e0b\uff1a<\/p>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/www.orczhou.com\/wp-content\/uploads\/2020\/03\/Snip20200330_11.png\" alt=\"\"\/><\/figure>\n<\/div>\n<\/div>\n\n\n\n<pre class=\"wp-block-code\"><code class=\"\">D0 81 AC 79 D5 40 6E 88 25 06 39 D4 82 F2 58 DB EE CA A4 8E 89 AE D1 9F EA 6F BA 8F 07 E4 D8 AD AB AB\n41 9D 3B 05 9F 7E 0D C6 05 E0 AA 76 97 E4 79 90 28 37 7E 2C 22 68 D6 43 93 BB B8 D0 03 82 B1 62 4E 1D 88 AE 2B FF\n85 FB 63 F4 07 2E D7 DF 4C C5 18 B7 45 9E 06 B1 68 6D 21 39 85 44 B6 BE F1 1C 71 6B 4E F7 9A C7 27 63 BB 6A 06 96\nE7 C3 3E 16 46 A6 76 A6 EC DF B6 39 1F 7B 36 E9 04 AF BA 47 81 F7 32 BB 81 B4 DE BD B8 7E 94 07 6C EE 10 CB 40 09\nB9 94 17 0D C9 5D A6 C9 D3 CC C8 0B 06 56 53 AF 0C BC C0 0B FC 7F 7A 32 65 5C 73 77 73 31 0C 90 82 15 E8 A6 1D A2\n5B F5 1B 66 BB 7F F2 30 9F 30 D6 5B E4 59 51 FD C9 8A 36 1E 8D 17 6E 78 0E EF 46 2A 82 86 E0 22 0D 3D DC 5E 02 26\nAC 2B E8 52 BC B1 4D 80 35 C8 50 AF 29 3F 51 6B 2D CB BD 24 AF 6D 00 3C 08 B3 2E 75 FD 31 0C 83\n\n<\/code><\/pre>\n\n\n\n<p>CA\u4f1a\u5bf9\u8bc1\u4e66\u7684\u4e3b\u8981\u5185\u5bb9\u505a\u4e00\u4e2a\u201c\u7b7e\u540d\u201d\uff0c\u7b7e\u540d\u53ef\u4ee5\u7b80\u5355\u7684\u7406\u89e3\u4e3a\u5bf9\u4e3b\u8981\u4fe1\u606f\u5148\u8fdb\u884c\u54c8\u5e0c\u6563\u5217\uff0c\u7136\u540e\u5bf9\u6563\u5217\u4fe1\u606f\u4f7f\u7528\u79c1\u94a5\u8fdb\u884c\u52a0\u5bc6\u8ba1\u7b97\uff0c\u5bc6\u6587\u5219\u4e3a\u5177\u4f53\u7684\u7b7e\u540d\u5185\u5bb9\u3002\u8be5\u7f51\u7ad9\u7684CA\u7b7e\u540d\u5177\u4f53\u5185\u5bb9\u5982\u4e0b\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code class=\"\">51 BC 54 8A 48 8C 51 7D 9A C1 14 60 7B 8C B3 24 A8 18 D1 77 59 74 0D 06 48 FE D7 BF 67 BD D2 E9 E6 AF\n1B A2 89 B3 63 CE E0 98 47 BE DE 66 C6 63 4F CB 26 56 0A 15 3F D1 C8 B9 BB C6 8A 32 3D DA B9 78 9D 40 4A 07 F5 41\nB3 FA FD C1 B2 36 14 E6 02 F0 3C 9D C2 1D 3B 09 80 09 98 4B E5 9B CC 26 CD 53 86 2F 85 73 AD 9A CC 76 77 1B A1 F1\n9F 3A 30 08 8F 24 3B 77 EC 9C 6F 4D 91 77 62 8D 0D 61 41 54 2F 11 AA EE F4 70 53 85 10 B8 D0 EF 05 33 05 32 37 CA\n0B D9 70 B1 93 31 7D C3 18 CF 3B F9 88 B7 33 B7 9F 08 43 02 B2 B1 EC 7D DF C3 C5 4C F9 58 BB F9 02 11 CC 78 5F EA\nC9 8C 5E 60 08 B3 8E A1 82 76 AA A2 02 B2 3E 2A CD F0 0A 0C 51 74 FB 13 8E 1D 8C 7F 25 94 9E 55 C0 D8 83 FF 37 BC\nE3 27 21 7C B3 1F EE F0 65 19 8E 23 96 2E 5D 17 F8 73 9E F0 A4 CD AC A4 6C 67 8E A3 4E 49 FC 7B<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">\u6982\u8ff0\u6570\u5b57\u7b7e\u540d<\/h4>\n\n\n\n<p>\u6709\u4e86CA\u7684\u7b7e\u540d\uff0c\u53ef\u4ee5\u7406\u89e3\u4e3awww.orczhou.com\u8fd9\u4e2a\u7ad9\u70b9\u63d0\u4f9b\u7684\u8bc1\u4e66\u662f\u7531\u8be5CA\u673a\u6784\uff08\u8fd9\u91cc\u662fLet&#8217;s Encrypt Authority X3\uff09\u6765\u80cc\u4e66\uff08\u8ba4\u8bc1\uff09\u7684\u3002<\/p>\n\n\n\n<p>\u5f53\u7136\uff0c\u6d4f\u89c8\u5668\u83b7\u5f97\u8fd9\u4e9b\u4fe1\u606f\u4e4b\u540e\uff0c\u9700\u8981\u81ea\u5df1\u4eb2\u81ea\u9a8c\u8bc1\u8fd9\u4e2a\u7b7e\u540d\u662f\u4e0d\u662f\u771f\u7684\u7531CA\u673a\u6784\u7b7e\u53d1\u7684\u3002\u6821\u9a8c\u7684\u65b9\u6cd5\u4e5f\u5f88\u7b80\u5355\uff0c\u5148\u7528CA\u673a\u6784\u7684\u516c\u94a5\u5bf9\u7b7e\u540d\u8fdb\u884c\u52a0\u5bc6\u8ba1\u7b97\uff0c\u4f1a\u83b7\u5f97\u4e00\u4e2a\u6563\u5217\u4fe1\u606f\u4e32\u3002\u6d4f\u89c8\u5668\u518d\u81ea\u5df1\u4eb2\u81ea\u5bf9\u8bc1\u4e66\u4fe1\u606f\u8fdb\u884c\u4e00\u6b21\u54c8\u5e0c\u6563\u5217\u8ba1\u7b97\uff0c\u5982\u679c\u8ba1\u7b97\u7ed3\u679c\u4e0e\u7b7e\u540d\u89e3\u5bc6\u7684\u4fe1\u606f\u4e00\u81f4\uff0c\u90a3\u6211\u4eec\u5c31\u8ba4\u4e3a\u8fd9\u4e2a\u8bc1\u4e66\uff08\u4e3b\u8981\u662f\u91cc\u9762\u516c\u94a5\u4fe1\u606f\uff09\u662f\u53ef\u9760\u7684\u3002<\/p>\n\n\n\n<p>\u5982\u679c\u8fd9\u91cc\u5c55\u5f00\uff0c\u8fd8\u6709\u4e00\u4e9b\u975e\u5e38\u6709\u610f\u601d\u7684\u95ee\u9898\u53ef\u4ee5\u53bb\u8003\u7a76\uff1a(a) \u6d4f\u89c8\u5668\u5982\u4f55\u62ff\u5230\u771f\u5b9e\u7684CA\u7684\u516c\u94a5\uff1b(b) CA\u673a\u6784\u7684\u79c1\u94a5\u662f\u5982\u4f55\u751f\u6210\u5982\u4f55\u4fdd\u62a4\u7684\uff1f(c) \u7ebf\u4e0a\u5404\u79cd\u7f51\u7ad9\u8fd9\u4e48\u591a\uff0c\u6709\u6839CA\u3001\u6709\u4e2d\u7ea7CA\uff0c\u4ed6\u4eec\u5173\u7cfb\u662f\u600e\u6837\u7684\uff1f \u8fd9\u4e9b\u95ee\u9898\u4e5f\u975e\u5e38\u6709\u610f\u601d\uff0c\u4e0b\u6b21\u6709\u7a7a\u518d\u8003\u7a76\u4e00\u4e0b\uff0c\u518d\u5199\u4e00\u5199\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u8bc1\u4e66\u66f4\u65b0<\/h3>\n\n\n\n<h4 class=\"wp-block-heading\">\u66f4\u65b0@202503<\/h4>\n\n\n\n<p>\u6700\u8fd1\u6536\u5230\u90ae\u4ef6\uff0cLet&#8217;s Encrypt \u4e0d\u518d\u4f1a\u90ae\u4ef6\u63d0\u9192\u8bc1\u4e66\u66f4\u65b0\uff0c\u53c2\u8003\uff1a<a href=\"https:\/\/letsencrypt.org\/2025\/01\/22\/ending-expiration-emails\">Ending Support for Expiration Notification Emails<\/a> \u3002\u6240\u4ee5\uff0c\u8fd9\u91cc\u66f4\u8fdb\u4e00\u6b65\u7684\uff0c\u8ba1\u5212\u901a\u8fc7<code>crontab<\/code>\u7684\u65b9\u5f0f\uff0c\u81ea\u52a8\u5316\u7684\u66f4\u65b0\u8bc1\u4e66\uff0c\u66f4\u65b0\u547d\u4ee4\u8c03\u6574\u5982\u4e0b\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">certbot certonly --apache -d www.orczhou.com -n<\/code><\/pre>\n\n\n\n<p>\u547d\u4ee4\u8bf4\u660e\uff0c\u53ef\u4ee5\u53c2\u8003\uff1a<code>certbot --help<\/code>\uff0c\u8fd9\u91cc\u4e0d\u518d\u8be6\u8ff0\u3002<\/p>\n\n\n\n<p>\u9700\u8981\u518d root \u6743\u9650\u8fd0\u884c\uff0c\u6545\u8be5\u8c03\u5ea6\u4efb\u52a1\u653e\u5728\u4e86<code>root<\/code>\u4e0b\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">sudo crontab -e\n0 3 1 * * certbot certonly --apache -d www.orczhou.com -n<\/code><\/pre>\n\n\n\n<p>\u6bcf\u4e2a\u6708\u76841\u53f7\u76843\u70b9\u4f1a\u6267\u884c\u5982\u4e0a\u547d\u4ee4\uff0c\u76f8\u5173\u7684\u8fd0\u884c\u65e5\u5fd7\uff0c\u53ef\u4ee5\u67e5\u770b\u8be5\u6587\u4ef6\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code class=\"\">sudo cat \/var\/log\/letsencrypt\/letsencrypt.log<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">\u66f4\u65b0@202303<\/h4>\n\n\n\n<p>\u76f4\u63a5\u8fd0\u884c\u5982\u4e0b\u547d\u4ee4\uff0c\u5373\u53ef\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">sudo certbot --apache<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">\u5347\u7ea7Amazon Linux 2\u540e@202109<\/h4>\n\n\n\n<p>\u5b89\u88c5\u8f6f\u4ef6\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">sudo yum install certbot sudo yum install python-certbot-apache<\/code><\/pre>\n\n\n\n<p>\u76f4\u63a5\u8fd0\u884c\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">sudo certbot --apache<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">\u66f4\u65b0@20210507<\/h4>\n\n\n\n<p>httpd\u9700\u8981\u91cd\u65b0\u542f\u52a8\uff0c\u6240\u4ee5\uff0c\u66f4\u65b0\u547d\u4ee4\u5982\u4e0b\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">sudo \/usr\/local\/bin\/certbot-auto certonly --apache \nsudo service httpd restart<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">\u66f4\u65b0@20200628<\/h4>\n\n\n\n<p><a href=\"https:\/\/letsencrypt.org\/\" target=\"_blank\" rel=\"noopener noreferrer\">Let&#8217;s Encrypt<\/a>\u7684\u514d\u8d39\u8bc1\u4e66\u6709\u6548\u671f\u662f3\u4e2a\u6708\uff0c\u6240\u4ee5\uff0c\u8fd9\u4e24\u5929\u5e94\u8be5\u662f\u7b2c\u4e00\u6b21\u5230\u671f\u4e86\u3002\u8fd9\u91cc\u8be6\u7ec6\u8bb0\u5f55\u8bc1\u4e66\u66f4\u65b0\u547d\u4ee4\u4e0e\u64cd\u4f5c\u3002<\/p>\n\n\n\n<p>\u4f7f\u7528\u539f\u6765\u7684\u547d\u4ee4\uff0c\u76f4\u63a5\u751f\u6210\u65b0\u8bc1\u4e66\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">sudo \/usr\/local\/bin\/certbot-auto certonly --apache<\/code><\/pre>\n\n\n\n<p>\u751f\u6210\u7684\u8bc1\u4e66\u76f8\u5173\u7684\u6587\u4ef6\u90fd\u4fdd\u6301\u5728\u4e86\u76ee\u5f55<code>\/etc\/letsencrypt\/live\/www.orczhou.com\/ <\/code><\/p>\n\n\n\n<p>\u4e3a\u4e86\u7b80\u5316\u914d\u7f6e\uff0c\u5c06httpd\u7684\u914d\u7f6e\u76f8\u5173\u4e2d\u76f8\u5173\u7684\u914d\u7f6e\u76f4\u63a5\u6307\u5411\u4e0a\u8ff0\u76ee\u5f55\u4e2d\u7684\u6587\u4ef6\uff0c\u8fd9\u6837\u540e\u7eed\u66f4\u65b0\u8bc1\u4e66\u540e\uff0c\u5c31\u4e0d\u518d\u9700\u8981\u91cd\u65b0\u914d\u7f6e\u4e86\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"apacheconf\" class=\"language-apacheconf\">SSLCertificateFile \/etc\/letsencrypt\/live\/www.orczhou.com\/cert.pem \n...... \nSSLCertificateKeyFile \/etc\/letsencrypt\/live\/www.orczhou.com\/privkey.pem<\/code><\/pre>\n\n\n\n<p>\u4e0b\u4e00\u6b21\u66f4\u65b0\u8bc1\u4e66\uff0c\u5219\u76f4\u63a5\u6267\u884c\u4ee5\u4e0b\u547d\u4ee4\uff0c\u7136\u540e\u91cd\u542fhttpd\u5373\u53ef\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">sudo \/usr\/local\/bin\/certbot-auto certonly --apache\n\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u4ece2018\u5e74\u5f00\u59cb\uff0cChrome\u6d4f\u89c8\u5668\u4f1a\u5c06\u6240\u6709\u6ca1\u6709\u4f7f\u7528https\u52a0\u5bc6\u4f20\u8f93\u7684\u7ad9\u70b9\u90fd\u6807\u8bb0\u4e3a\u4e0d\u5b89\u5168\u7684\u3002\u4e2a\u4eba\u535a\u5ba2\u662f\u642d\u5efa\u5728httpd\u4e0a\uff0c\u4e00\u76f4\u6ca1\u6709\u5347\u7ea7\u5230https\uff0c\u6240\u4ee5\u4e5f\u4f1a\u6807\u8bb0\u4e3a\u201c\u4e0d\u5b89\u5168\u201d\u3002\u8fd9\u4e2a\u5468\u672b\uff0c\u82b1\u4e86\u51e0\u4e2a\u5c0f\u65f6\u201c\u6298\u817e\u201d\uff0c\u7ec8\u4e8e\u8ba9\u7ad9\u70b9\u53d8\u5f97\u201c\u5b89\u5168\u201d\u4e86\u3002 \u56e0\u4e3a\u8bc1\u4e66\u6709\u6548\u671f\u53ea\u6709\u4e09\u4e2a\u6708\uff0c\u6240\u4ee5\uff0c\u672c\u6587https\u7684\u57fa\u672c\u539f\u7406\u548c\u914d\u7f6e\u505a\u4e2a\u4ecb\u7ecd\u548c\u8bb0\u5f55\uff0c\u4fbf\u4e8e\u540e\u7eed\u6301\u7eed\u7ef4\u62a4\u3002 \u914d\u7f6e \u9996\u5148\uff0c\u8bc1\u4e66\u673a\u6784\u9009\u62e9\u4e86Let&#8217;s Encrypt\uff0c\u4f7f\u7528\u4e86\u5bf9\u5e94\u7684\u5f00\u6e90\u5de5\u5177certbot\u751f\u6210\u79d8\u94a5\uff0c\u5e76\u83b7\u5f97\u8bc1\u4e66\u3002\u8be6\u7ec6\u7684\u4f7f\u7528\u65b9\u6cd5\u53c2\u8003\uff1acertbot instructions\u3002 \u6211\u4f7f\u7528\u7684EC2\u7684Amazon Linux\uff0ccertbot\u5bf9\u8fd9\u4e2a\u53d1\u884c\u7248\u652f\u6301\u8fd8\u4e0d\u662f\u5f88\u597d\u3002\u6240\u4ee5\u6ca1\u6709\u4f7f\u7528\u5168\u81ea\u52a8\u7684\u914d\u7f6e\u65b9\u6cd5\uff0c\u800c\u662f\uff0c\u7528certbot\u751f\u6210\u79d8\u94a5\u3001\u8bc1\u4e66\u540e\uff0c\u518d\u624b\u52a8\u914d\u7f6ehttpd\u3002\u56e0\u4e3a\u8bc1\u4e66\u6709\u6548\u671f\u53ea\u6709\u4e09\u4e2a\u6708\uff0c\u6240\u4ee5\uff0c\u7ecf\u5e38\u9700\u8981\u8fc7\u6765\u624b\u52a8\u66f4\u65b0\u3002\u7b49\u4e0b\u4e2a\u5468\u672b\u518d\u6765\u7814\u7a76\u4e00\u4e0b\u662f\u5426\u53ef\u4ee5\u5b9e\u73b0\u5168\u81ea\u52a8\u914d\u7f6e\u3002<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"wp-custom-template-a-1440-px-width-template","format":"standard","meta":{"_eb_attr":"","inline_featured_image":false,"_tocer_settings":[],"footnotes":""},"categories":[1],"tags":[],"class_list":["post-6138","post","type-post","status-publish","format-standard","hentry","category-simplelife"],"_links":{"self":[{"href":"https:\/\/www.orczhou.com\/index.php\/wp-json\/wp\/v2\/posts\/6138","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.orczhou.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.orczhou.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.orczhou.com\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.orczhou.com\/index.php\/wp-json\/wp\/v2\/comments?post=6138"}],"version-history":[{"count":66,"href":"https:\/\/www.orczhou.com\/index.php\/wp-json\/wp\/v2\/posts\/6138\/revisions"}],"predecessor-version":[{"id":17839,"href":"https:\/\/www.orczhou.com\/index.php\/wp-json\/wp\/v2\/posts\/6138\/revisions\/17839"}],"wp:attachment":[{"href":"https:\/\/www.orczhou.com\/index.php\/wp-json\/wp\/v2\/media?parent=6138"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.orczhou.com\/index.php\/wp-json\/wp\/v2\/categories?post=6138"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.orczhou.com\/index.php\/wp-json\/wp\/v2\/tags?post=6138"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}