{"id":30862,"date":"2024-11-25T12:35:10","date_gmt":"2024-11-25T04:35:10","guid":{"rendered":"https:\/\/fwq.ai\/blog\/30862\/"},"modified":"2024-11-25T12:35:10","modified_gmt":"2024-11-25T04:35:10","slug":"%e5%be%ae%e4%bf%a1%e5%b0%8f%e7%a8%8b%e5%ba%8f%e5%bc%80%e5%8f%91%e4%b9%8b%e8%af%a6%e8%a7%a3nginx%e7%9a%84%e7%8e%af%e5%a2%83%e9%85%8d%e7%bd%ae","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/30862\/","title":{"rendered":"\u5fae\u4fe1\u5c0f\u7a0b\u5e8f\u5f00\u53d1\u4e4b\u8be6\u89e3Nginx\u7684\u73af\u5883\u914d\u7f6e"},"content":{"rendered":"<p><strong>\u5fae\u4fe1\u5c0f\u7a0b\u5e8fserver\u73af\u5883\u914d\u7f6e\u8be6\u89e3<\/strong><\/p>\n<p>\u4e3b\u8981\u5185\u5bb9\uff1a<\/p>\n<p>1. SSL\u514d\u8d39\u8bc1\u4e66\u7533\u8bf7\u6b65\u9aa4<\/p>\n<p>2. Nginx HTTPS \u914d\u7f6e<\/p>\n<p>3. TLS 1.2 \u5347\u7ea7\u8fc7\u7a0b<\/p>\n<p>\u5fae\u4fe1\u5c0f\u7a0b\u5e8f\u8981\u6c42\u4f7f\u7528 https \u53d1\u9001\u8bf7\u6c42\uff0c\u90a3\u4e48Web\u670d\u52a1\u5668\u5c31\u8981\u914d\u7f6e\u6210\u652f\u6301 https\uff0c\u9700\u8981\u5148\u7533\u8bf7SSL\u8bc1\u4e66<\/p>\n<p>\u5c0f\u7a0b\u5e8f\u4e5f\u8981\u6c42 TLS\uff08\u4f20\u8f93\u5c42\u5b89\u5168\u534f\u8bae\uff09\u7684\u7248\u672c\u81f3\u5c11\u4e3a 1.2\uff0c\u5728\u914d\u7f6e\u597d https\u4e4b\u540e\uff0c\u5982\u679c TLS \u7684\u7248\u672c\u8f83\u4f4e\uff0c\u5c31\u6d89\u53ca\u5230\u5347\u7ea7\u95ee\u9898<\/p>\n<p>\u6240\u4ee5 Server\u7aef\u73af\u5883\u914d\u7f6e\u7684\u4e3b\u8981\u6b65\u9aa4\uff1a<\/p>\n<ol>\n<li>\n<p>\u7533\u8bf7 SSL \u8bc1\u4e66<\/p>\n<\/li>\n<li>\n<p>\u914d\u7f6eweb\u670d\u52a1\u5668\u652f\u6301https\uff08\u6211\u4f7f\u7528\u7684\u662f\uff09<\/p>\n<\/li>\n<li>\n<p>\u5347\u7ea7\u5230 TLS 1.2<\/p>\n<\/li>\n<\/ol>\n<p><strong>SSL\u8bc1\u4e66\u7533\u8bf7<\/strong><\/p>\n<p>https \u9700\u8981\u4f7f\u7528SSL\u8bc1\u4e66\uff0c\u8fd9\u4e2a\u8bc1\u4e66\u7684\u4ef7\u683c\u4e3a\u6bcf\u5e74\u4e09\u4e94\u5343\u5230\u4e00\u4e07\u591a\uff0c\u5bf9\u4e8e\u5c0f\u56e2\u961f\u6216\u8005\u662f\u60f3\u719f\u6089\u4e00\u4e0b\u5c0f\u7a0b\u5e8f\u7684\u7528\u6237\u6765\u8bf4\uff0c\u8fd9\u4e2a\u4ef7\u683c\u8fd8\u662f\u6bd4\u8f83\u9ad8\u7684\uff0c\u8fd9\u79cd\u60c5\u51b5\u53ef\u4ee5\u9009\u62e9\u514d\u8d39\u8bc1\u4e66,\u53e6\u5916\uff0c\u4e5f\u53ef\u4ee5\u8003\u8651\u4e00\u4e0b\u4e91\u670d\u52a1\uff0c\u4f8b\u5982 <strong>\u91ce\u72d7<\/strong>\u3001<strong>LeanCloud<\/strong> \u8fd9\u4e9b\u6210\u719f\u7684\u670d\u52a1\u5e73\u53f0\uff0c\u90fd\u652f\u6301 https\uff0c\u5982\u679c\u8fd9\u4e9b\u5e73\u53f0\u80fd\u6ee1\u8db3\u81ea\u5df1\u7684\u4e1a\u52a1\u9700\u6c42\uff0c\u5c31\u7701\u6389\u4e86\u5f88\u591a\u9ebb\u70e6<\/p>\n<p><strong>\u514d\u8d39\u8bc1\u4e66<\/strong>\uff1a\u963f\u91cc\u4e91\u4e0a\u7684 \u8d5b\u95e8\u94c1\u514b \u514d\u8d39\u578bDV SSL<\/p>\n<p>\u7533\u8bf7\u8fc7\u7a0b<\/p>\n<pre>wanwang.aliyun.com<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>\u767b\u5f55\u63a7\u5236\u53f0\uff0c\u70b9\u51fb\u5de6\u4fa7\u83dc\u5355\u4e2d\u7684 \u5b89\u5168 -&gt; \u8bc1\u4e66\u670d\u52a1\uff0c\u8fd9\u4e2a\u9875\u9762\u4e2d\u53f3\u4e0a\u89d2\u6709 \u8d2d\u4e70\u8bc1\u4e66 \u6309\u94ae\uff0c\u70b9\u51fb\u8fdb\u5165\u8d2d\u4e70\u9875\uff0c\u9009\u62e9\u514d\u8d39\u578bDV SSL\uff0c\u8d2d\u4e70<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/000\/000\/007\/907dd929e4c24c51c5274632930c3455-0.png\" class=\"aligncenter\" title=\"\u5fae\u4fe1\u5c0f\u7a0b\u5e8f\u5f00\u53d1\u4e4b\u8be6\u89e3Nginx\u7684\u73af\u5883\u914d\u7f6e\u63d2\u56fe\" alt=\"\u5fae\u4fe1\u5c0f\u7a0b\u5e8f\u5f00\u53d1\u4e4b\u8be6\u89e3Nginx\u7684\u73af\u5883\u914d\u7f6e\u63d2\u56fe\" \/><\/p>\n<p>\u8ba2\u5355\u91d1\u989d\u4e3a<strong>0<\/strong>\u5143\uff0c\u53ea\u662f\u8d70\u4e00\u904d\u8d2d\u4e70\u6d41\u7a0b\uff0c\u5b8c\u6210\u540e\u56de\u5230\u8bc1\u4e66\u670d\u52a1\u9875\u9762\uff0c\u53ef\u4ee5\u5728\u5217\u8868\u4e2d\u770b\u5230\u4e00\u4e2a\u8bc1\u4e66<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/000\/000\/007\/b91018a59051b67809083c083e66f146-1.png\" class=\"aligncenter\" title=\"\u5fae\u4fe1\u5c0f\u7a0b\u5e8f\u5f00\u53d1\u4e4b\u8be6\u89e3Nginx\u7684\u73af\u5883\u914d\u7f6e\u63d2\u56fe1\" alt=\"\u5fae\u4fe1\u5c0f\u7a0b\u5e8f\u5f00\u53d1\u4e4b\u8be6\u89e3Nginx\u7684\u73af\u5883\u914d\u7f6e\u63d2\u56fe1\" \/><\/p>\n<p>\u9996\u5148\u8fdb\u884c \u201c<strong>\u8865\u5168<\/strong>\u201d \u64cd\u4f5c\uff0c\u586b\u5199\u81ea\u5df1\u7684\u57df\u540d\u548c\u57fa\u672c\u4fe1\u606f<\/p>\n<p>\u4e4b\u540e \u201c<strong>\u8865\u5168<\/strong>\u201d \u8fde\u63a5\u4f1a\u53d8\u4e3a \u201c<strong>\u8fdb\u5ea6<\/strong>\u201d\uff0c\u70b9\u51fb\u540e\u6839\u636e\u63d0\u793a\u64cd\u4f5c\uff0c\u4e3b\u8981\u662f\u9a8c\u8bc1\u81ea\u5df1\u7684\u670d\u52a1\u5668\uff0c\u6211\u9009\u7684\u662f\u6587\u4ef6\u9a8c\u8bc1\uff0c\u4e0b\u8f7d\u4e00\u4e2a\u6587\u4ef6\u4e0a\u4f20\u5230\u81ea\u5df1\u670d\u52a1\u5668\uff0c\u7b49\u5f85\u9a8c\u8bc1<\/p>\n<p>\u9a8c\u8bc1\u6ca1\u95ee\u9898\u540e\uff0c\u5927\u698210\u5206\u949f\u5de6\u53f3\u5c31\u53ef\u4ee5\u4e0b\u8f7dSSL\u8bc1\u4e66\u4e86<\/p>\n<p><strong>Nginx HTTPS \u914d\u7f6e<\/strong><\/p>\n<p>\u8bc1\u4e66\u4e0a\u4f20\u5230nginx\u76ee\u5f55\u4e0b\uff0c\u4f8b\u5982<\/p>\n<pre>\/usr\/local\/nginx\/cert<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>\u4fee\u6539 conf\/nginx.conf<\/p>\n<p>\u914d\u7f6e HTTPS server \u5757\u513f\uff0c\u6dfb\u52a0SSL\u914d\u7f6e<\/p>\n<pre>#&nbsp;HTTPS&nbsp;server\r\n#\r\nserver&nbsp;{\r\n&nbsp;listen&nbsp;&nbsp;443&nbsp;ssl;\r\n&nbsp;server_name&nbsp;localhost;\r\n&nbsp;......\r\n&nbsp;\r\n&nbsp;ssl&nbsp;on;\r\n&nbsp;ssl_certificate&nbsp;\/usr\/local\/nginx\/cert\/213994146300992.pem;\r\n&nbsp;ssl_certificate_key&nbsp;\/usr\/local\/nginx\/cert\/213994146300992.key;\r\n&nbsp;ssl_session_timeout&nbsp;5m;\r\n&nbsp;ssl_ciphers&nbsp;ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4;\r\n&nbsp;ssl_protocols&nbsp;TLSv1&nbsp;TLSv1.1&nbsp;TLSv1.2;\r\n&nbsp;ssl_prefer_server_ciphers&nbsp;on;\r\n\r\n\r\n\r\n\r\n&nbsp;location&nbsp;\/&nbsp;{\r\n&nbsp;&nbsp;root&nbsp;html;\r\n&nbsp;&nbsp;index&nbsp;index.html&nbsp;index.htm;\r\n&nbsp;}\r\n\r\n\r\n&nbsp;......\r\n&nbsp;\r\n}<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>\u91cd\u65b0\u52a0\u8f7d\u914d\u7f6e\u6587\u4ef6\uff0c\u6d4f\u89c8\u5668\u4e2d\u4f7f\u7528 https \u65b9\u5f0f\u8bbf\u95ee\u81ea\u5df1\u7684\u57df\u540d\uff0c\u770b\u662f\u5426\u53ef\u4ee5\u6b63\u5e38\u8bbf\u95ee<\/p>\n<p><strong>\u5347\u7ea7\u5230 TLS 1.2<\/strong><\/p>\n<p>\u67e5\u770b TLS \u7248\u672c<\/p>\n<p>\u8bbf\u95ee https url \u540e\uff0c\u5730\u5740\u680f\u524d\u9762\u4f1a\u6709\u4e00\u4e2a\u7eff\u8272\u5c0f\u9501\u56fe\u6807\uff0c\u70b9\u51fb\u5b83\u53ef\u4ee5\u67e5\u770b\u5230 TLS \u7248\u672c\u4fe1\u606f<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/000\/000\/007\/b91018a59051b67809083c083e66f146-2.png\" class=\"aligncenter\" title=\"\u5fae\u4fe1\u5c0f\u7a0b\u5e8f\u5f00\u53d1\u4e4b\u8be6\u89e3Nginx\u7684\u73af\u5883\u914d\u7f6e\u63d2\u56fe2\" alt=\"\u5fae\u4fe1\u5c0f\u7a0b\u5e8f\u5f00\u53d1\u4e4b\u8be6\u89e3Nginx\u7684\u73af\u5883\u914d\u7f6e\u63d2\u56fe2\" \/><\/p>\n<p>\u5982\u679c\u6ca1\u6709\u8fbe\u5230 1.2 \u5c31\u9700\u8981\u5347\u7ea7<\/p>\n<p>\u4e0b\u9762\u7684\u64cd\u4f5c\u73af\u5883\u4e3a centos linux<\/p>\n<p>1\uff09\u67e5\u770b openssl \u7248\u672c<\/p>\n<pre>https:\/\/www.openssl.org\/source\/<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>1.0.2\u4ee5\u4e0b\u7684\u7248\u672c\u5c31\u8981\u5347\u7ea7\uff0c\u4e4b\u524d\u7684\u7248\u672c\u5b98\u65b9\u90fd\u5df2\u7ecf\u505c\u6b62\u7ef4\u62a4<\/p>\n<p>2\uff09\u5347\u7ea7 openssl<\/p>\n<p>\u5230\u5b98\u7f51\u4e0b\u8f7d\u65b0\u7248<\/p>\n<pre>https:\/\/www.openssl.org\/source\/<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>\u4f8b\u5982\u4e0b\u8f7d\u5230 \/usr\/local<\/p>\n<p>\u5347\u7ea7<\/p>\n<pre>cd&nbsp;\/usr\/local\r\ntar&nbsp;zxvf&nbsp;openssl-1.0.2j.tar.gz&nbsp;\r\ncd&nbsp;openssl-1.0.2j&nbsp;\r\n.\/config&nbsp;--prefix=\/usr\/local\/openssl&nbsp;\r\nmake&nbsp;&amp;amp;&amp;amp;&nbsp;make&nbsp;install&nbsp;\r\nmv&nbsp;\/usr\/bin\/openssl&nbsp;\r\n&nbsp;\/usr\/bin\/openssl.OFF&nbsp;\r\nmv&nbsp;\/usr\/include\/openssl&nbsp;\r\n&nbsp;\/usr\/include\/openssl.OFF&nbsp;\r\nln&nbsp;-s&nbsp;\r\n&nbsp;\/usr\/local\/openssl\/bin\/openssl&nbsp;\r\n&nbsp;\/usr\/bin\/openssl&nbsp;\r\nln&nbsp;-s&nbsp;\r\n&nbsp;\/usr\/local\/openssl\/include\/openssl&nbsp;\r\n&nbsp;\/usr\/include\/openssl&nbsp;\r\necho&nbsp;\"\/usr\/local\/openssl\/lib\"\r\n&nbsp;&amp;gt;&amp;gt;\/etc\/ld.so.conf&nbsp;\r\nldconfig&nbsp;-v<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>\u9a8c\u8bc1<\/p>\n<pre>openssl&nbsp;version&nbsp;-a<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>3\uff09\u91cd\u65b0\u7f16\u8bd1 nginx<\/p>\n<p>\u5347\u7ea7OpenSSL\u4e4b\u540e\uff0cnginx\u9700\u8981\u91cd\u65b0\u7f16\u8bd1\uff0c\u5426\u5219TLS\u8fd8\u662f\u65e7\u7248\u672c\u7684<\/p>\n<p>\u4e0b\u9762\u662f\u57fa\u672c\u5b89\u88c5\uff0c\u5982\u60a8\u9700\u6c42\u66f4\u591a\uff0c\u8bf7\u81ea\u884c\u8c03\u6574<\/p>\n<p>\u7528\u5230\u7684\u8f6f\u4ef6<\/p>\n<p>openssl<\/p>\n<p>\u524d\u9762\u5df2\u7ecf\u5b89\u88c5\u5b8c\u4e86<\/p>\n<p>pcre<\/p>\n<p><strong>pcre\u5b89\u88c5\uff1a<\/strong><\/p>\n<pre>\u4e0b\u8f7d\u5730\u5740\r\nhttp:\/\/www.pcre.org\/\r\n\u4f8b\u5982\u4e0b\u8f7d\u5230&nbsp;\/usr\/local\r\ncd&nbsp;\/usr\/local\r\ntar&nbsp;-zxv&nbsp;-f&nbsp;pcre-8.39.tar.gz\r\ncd&nbsp;pcre-8.39\r\n.\/configure&nbsp;--prefix=\/usr\/local\/pcre\/\r\nmake&nbsp;&amp;amp;&amp;amp;&nbsp;make&nbsp;install<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p><strong>zlib\u5b89\u88c5<\/strong><\/p>\n<pre>\u4e0b\u8f7d\u5730\u5740&nbsp;\r\nhttp:\/\/www.zlib.net\/\r\n\u4f8b\u5982\u4e0b\u8f7d\u5230&nbsp;\/usr\/local\r\ncd&nbsp;\/usr\/local\r\ntar&nbsp;-zxv&nbsp;-f&nbsp;zlib-1.2.10.tar.gz\r\ncd&nbsp;zlib-1.2.10\r\n.\/configure&nbsp;--prefix=\/usr\/local\/zlib\/\r\nmake&nbsp;&amp;amp;&amp;amp;&nbsp;make&nbsp;install<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p><strong>\u7f16\u8bd1nginx:<\/strong><\/p>\n<pre>tar&nbsp;zxvf&nbsp;nginx-1.10.3.tar.gz\r\ncd&nbsp;nginx-1.10.3&nbsp;\r\n.\/configure&nbsp;--prefix=\/data\/nginx&nbsp;--with-http_ssl_module&nbsp;--with-openssl=\/usr\/local\/openssl<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<pre>tar&nbsp;-zxvf&nbsp;nginx-1.10.2.tar.gz\r\ncd&nbsp;nginx-1.10.2\r\n.\/configure&nbsp;\r\n--user=\u7528\u6237&nbsp;\r\n--group=\u7ec4&nbsp;\r\n--prefix=\/usr\/local\/nginx&nbsp;\r\n--with-http_ssl_module&nbsp;\r\n--with-openssl=\/usr\/local\/openssl-1.0.2j&nbsp;\r\n--with-pcre=\/usr\/local\/pcre-8.39&nbsp;\r\n--with-zlib=\/usr\/local\/zlib-1.2.10&nbsp;\r\n--with-http_stub_status_module&nbsp;\r\n--with-threads\r\nmake&nbsp;&amp;amp;&amp;amp;&nbsp;make&nbsp;install<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>\u7f16\u8bd1\u5b8c\u6210\u540e\uff0c\u8bb0\u5f97\u628a\u4fee\u6539\u914d\u7f6e\u6587\u4ef6\uff0c\u6dfb\u52a0\u597d SSL \u7684\u76f8\u5173\u4fe1\u606f<\/p>\n<p>\u7136\u540e\u542f\u52a8nginx\uff0c\u8bbf\u95ee https url \u518d\u6b21\u9a8c\u8bc1 TSL \u7248\u672c<\/p>\n<p><strong>Nginx\u7f16\u8bd1\u5b89\u88c5\u65f6\u9047\u5230\u7684\u95ee\u9898\uff1a<\/strong><\/p>\n<p>\u62a5\u9519\u4fe1\u606f\u5982\u4e0b\uff1a<\/p>\n<pre>\/bin\/sh:&nbsp;line&nbsp;2:&nbsp;.\/config:&nbsp;No&nbsp;such&nbsp;file&nbsp;or&nbsp;directory\r\nmake[1]:&nbsp;***&nbsp;[\/usr\/local\/ssl\/.openssl\/include\/openssl\/ssl.h]&nbsp;Error&nbsp;127\r\nmake[1]:&nbsp;Leaving&nbsp;directory&nbsp;`\/usr\/local\/src\/nginx-1.10.2\u2018\r\nmake:&nbsp;***&nbsp;[build]&nbsp;Error&nbsp;2<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>\u9700\u8981\u8bf4\u660e\u7684\u662f\uff0c\u6211\u8fd9\u91cc\u7f16\u8bd1\u6240\u4f7f\u7528\u7684Nginx\u6e90\u7801\u662f1.10.2\u7684\u3002\u6839\u636e\u62a5\u9519\u4fe1\u606f\u6211\u4eec\u77e5\u9053\uff0c\u51fa\u9519\u662f\u56e0\u4e3aNginx\u5728\u7f16\u8bd1\u65f6\u5e76\u4e0d\u80fd\u5728\/usr\/local\/ssl\/.openssl\/ \u8fd9\u4e2a\u76ee\u5f55\u627e\u5230\u5bf9\u5e94\u7684\u6587\u4ef6\uff0c\u5176\u5b9e\u6211\u4eec\u6253\u5f00\/usr\/local\/ssl\/\u8fd9\u4e2a\u76ee\u5f55\u53ef\u4ee5\u53d1\u73b0\u8fd9\u4e2a\u76ee\u5f55\u4e0b\u662f\u6ca1\u6709.openssl\u76ee\u5f55\u7684\uff0c\u56e0\u6b64\u6211\u4eec\u4fee\u6539Nginx\u7f16\u8bd1\u65f6\u5bf9openssl\u7684\u8def\u5f84\u9009\u62e9\u5c31\u53ef\u4ee5\u89e3\u51b3\u8fd9\u4e2a\u95ee\u9898\u4e86<\/p>\n<p><strong>\u89e3\u51b3\u65b9\u6848\uff1a<\/strong><\/p>\n<p>\u6253\u5f00nginx\u6e90\u6587\u4ef6\u4e0b\u7684\/root\/nginx-1.10.2\/auto\/lib\/openssl\/conf\u6587\u4ef6<\/p>\n<p>\u627e\u5230\u8fd9\u4e48\u4e00\u6bb5\u4ee3\u7801\uff1a<\/p>\n<pre>CORE_INCS=\"$CORE_INCS&nbsp;$OPENSSL\/.openssl\/include\"\r\nCORE_DEPS=\"$CORE_DEPS&nbsp;$OPENSSL\/.openssl\/include\/openssl\/ssl.h\"\r\nCORE_LIBS=\"$CORE_LIBS&nbsp;$OPENSSL\/.openssl\/lib\/libssl.a\"\r\nCORE_LIBS=\"$CORE_LIBS&nbsp;$OPENSSL\/.openssl\/lib\/libcrypto.a\"\r\nCORE_LIBS=\"$CORE_LIBS&nbsp;$NGX_LIBDL\"<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>\u4fee\u6539\u6210\u4ee5\u4e0b\u4ee3\u7801\uff1a<\/p>\n<pre>CORE_INCS=\"$CORE_INCS&nbsp;$OPENSSL\/.openssl\/include\"\r\nCORE_DEPS=\"$CORE_DEPS&nbsp;$OPENSSL\/include\/openssl\/ssl.h\"\r\nCORE_LIBS=\"$CORE_LIBS&nbsp;$OPENSSL\/lib\/libssl.a\"\r\nCORE_LIBS=\"$CORE_LIBS&nbsp;$OPENSSL\/lib\/libcrypto.a\"\r\nCORE_LIBS=\"$CORE_LIBS&nbsp;$NGX_LIBDL\"<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>\u7136\u540e\u518d\u8fdb\u884cNginx\u7684\u7f16\u8bd1\u5b89\u88c5\u5373\u53ef\u3000<\/p>\n<p>\u4ee5\u4e0a\u5c31\u662f\u5fae\u4fe1\u5c0f\u7a0b\u5e8f\u5f00\u53d1\u4e4b\u8be6\u89e3Nginx\u7684\u73af\u5883\u914d\u7f6e\u7684\u8be6\u7ec6\u5185\u5bb9\uff0c\u66f4\u591a\u8bf7\u5173\u6ce8\u7c73\u4e91\u5176\u5b83\u76f8\u5173\u6587\u7ae0\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5fae\u4fe1\u5c0f\u7a0b\u5e8fserver\u73af\u5883\u914d\u7f6e\u8be6\u89e3 \u4e3b\u8981\u5185\u5bb9\uff1a 1. SSL\u514d\u8d39\u8bc1\u4e66\u7533\u8bf7\u6b65\u9aa4 2. Nginx HTTPS \u914d\u7f6e 3. TLS 1.2 \u5347\u7ea7\u8fc7\u7a0b \u5fae\u4fe1\u5c0f\u7a0b\u5e8f\u8981\u6c42\u4f7f\u7528 https \u53d1\u9001\u8bf7\u6c42\uff0c\u90a3\u4e48Web\u670d\u52a1\u5668\u5c31\u8981\u914d\u7f6e\u6210\u652f\u6301 https\uff0c\u9700\u8981\u5148\u7533\u8bf7SSL\u8bc1\u4e66 \u5c0f\u7a0b\u5e8f\u4e5f\u8981\u6c42 TLS\uff08\u4f20\u8f93\u5c42\u5b89\u5168\u534f\u8bae\uff09\u7684\u7248\u672c\u81f3\u5c11\u4e3a 1.2\uff0c\u5728\u914d\u7f6e\u597d https\u4e4b\u540e\uff0c\u5982\u679c TLS \u7684\u7248\u672c\u8f83\u4f4e\uff0c\u5c31\u6d89\u53ca\u5230\u5347\u7ea7\u95ee\u9898 \u6240\u4ee5 Server\u7aef\u73af\u5883\u914d\u7f6e\u7684\u4e3b\u8981\u6b65\u9aa4\uff1a \u7533\u8bf7 SSL \u8bc1\u4e66 \u914d\u7f6eweb\u670d\u52a1\u5668\u652f\u6301https\uff08\u6211\u4f7f\u7528\u7684\u662f\uff09 \u5347\u7ea7\u5230 TLS 1.2 SSL\u8bc1\u4e66\u7533\u8bf7 https \u9700\u8981\u4f7f\u7528SSL\u8bc1\u4e66\uff0c\u8fd9\u4e2a\u8bc1\u4e66\u7684\u4ef7\u683c\u4e3a\u6bcf\u5e74\u4e09\u4e94\u5343\u5230\u4e00\u4e07\u591a\uff0c\u5bf9\u4e8e\u5c0f\u56e2\u961f\u6216\u8005\u662f\u60f3\u719f\u6089\u4e00\u4e0b\u5c0f\u7a0b\u5e8f\u7684\u7528\u6237\u6765\u8bf4\uff0c\u8fd9\u4e2a\u4ef7\u683c\u8fd8\u662f\u6bd4\u8f83\u9ad8\u7684\uff0c\u8fd9\u79cd\u60c5\u51b5\u53ef\u4ee5\u9009\u62e9\u514d\u8d39\u8bc1\u4e66,\u53e6\u5916\uff0c\u4e5f\u53ef\u4ee5\u8003\u8651\u4e00\u4e0b\u4e91\u670d\u52a1\uff0c\u4f8b\u5982 \u91ce\u72d7\u3001LeanCloud \u8fd9\u4e9b\u6210\u719f\u7684\u670d\u52a1\u5e73\u53f0\uff0c\u90fd\u652f\u6301 https\uff0c\u5982\u679c\u8fd9\u4e9b\u5e73\u53f0\u80fd\u6ee1\u8db3\u81ea\u5df1\u7684\u4e1a\u52a1\u9700\u6c42\uff0c\u5c31\u7701\u6389\u4e86\u5f88\u591a\u9ebb\u70e6 \u514d\u8d39\u8bc1\u4e66\uff1a\u963f\u91cc\u4e91\u4e0a\u7684 \u8d5b\u95e8\u94c1\u514b \u514d\u8d39\u578bDV SSL \u7533\u8bf7\u8fc7\u7a0b wanwang.aliyun.com \u767b\u5f55\u540e\u590d\u5236 \u767b\u5f55\u63a7\u5236\u53f0\uff0c\u70b9\u51fb\u5de6\u4fa7\u83dc\u5355\u4e2d\u7684 \u5b89\u5168 -&gt; \u8bc1\u4e66\u670d\u52a1\uff0c\u8fd9\u4e2a\u9875\u9762\u4e2d\u53f3\u4e0a\u89d2\u6709 \u8d2d\u4e70\u8bc1\u4e66 \u6309\u94ae\uff0c\u70b9\u51fb\u8fdb\u5165\u8d2d\u4e70\u9875\uff0c\u9009\u62e9\u514d\u8d39\u578bDV SSL\uff0c\u8d2d\u4e70 \u8ba2\u5355\u91d1\u989d\u4e3a0\u5143\uff0c\u53ea\u662f\u8d70\u4e00\u904d\u8d2d\u4e70\u6d41\u7a0b\uff0c\u5b8c\u6210\u540e\u56de\u5230\u8bc1\u4e66\u670d\u52a1\u9875\u9762\uff0c\u53ef\u4ee5\u5728\u5217\u8868\u4e2d\u770b\u5230\u4e00\u4e2a\u8bc1\u4e66 \u9996\u5148\u8fdb\u884c \u201c\u8865\u5168\u201d \u64cd\u4f5c\uff0c\u586b\u5199\u81ea\u5df1\u7684\u57df\u540d\u548c\u57fa\u672c\u4fe1\u606f [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[19],"tags":[],"class_list":["post-30862","post","type-post","status-publish","format-standard","hentry","category-19"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/30862","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/comments?post=30862"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/30862\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=30862"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=30862"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=30862"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}