{"id":312,"date":"2022-11-25T15:23:30","date_gmt":"2022-11-25T07:23:30","guid":{"rendered":"https:\/\/app.applebyme.cn\/cloud\/wwwinfo\/312.html"},"modified":"2022-11-25T15:23:30","modified_gmt":"2022-11-25T07:23:30","slug":"nginx%e5%ae%89%e8%a3%85ssl%e8%af%81%e4%b9%a6-nginx%e9%85%8d%e7%bd%aehttps%e8%af%81%e4%b9%a6","status":"publish","type":"post","link":"https:\/\/app.applebyme.cn\/cloud\/wwwinfo\/312.html","title":{"rendered":"Nginx\u5b89\u88c5SSL\u8bc1\u4e66 Nginx\u914d\u7f6ehttps\u8bc1\u4e66"},"content":{"rendered":"<figure id=\"pid16902\" class=\"wp-block-table is-style-stripes\">\n<table>\n<tbody>\n<tr>\n<td><span class=\"wpcom_tag_link\">Nginx\u5b89\u88c5SSL<\/span>\u8bc1\u4e66 <span class=\"wpcom_tag_link\">Nginx\u914d\u7f6ehttps<\/span>\u8bc1\u4e66<br \/>\u9996\u5148\u62ff\u5230<span class=\"wpcom_tag_link\">Nginx<\/span>\u670d\u52a1\u5668\u8bc1\u4e66<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/figure>\n<pre class=\"wp-block-code\"><code>yourdomain.com.crt     (\u670d\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<\/code><\/pre>\n<p><strong>\u73af\u5883\u68c0\u6d4b<\/strong>\uff0c\u68c0\u6d4b\u547d\u4ee4\u5982\u4e0b\uff08\u6d4b\u8bd5nginx\u662f\u5426\u652f\u6301SSL\uff09<\/p>\n<pre class=\"wp-block-code\"><code>nginx -V<\/code><\/pre>\n<p>\u5982\u679c\u6709\u663e\u793a \u2013with-http_<span class=\"wpcom_tag_link\">ssl<\/span>_module \u8868\u793a\u5df2\u7f16\u8bd1openssl\uff0c\u652f\u6301\u5b89\u88c5ssl\uff1b<\/p>\n<p>\u5982\u679c\u6ca1\u6709\u5b89\u88c5\u8bf7\u4e0b\u8f7dnginx\u6e90\u7801\u91cd\u65b0\u7f16\u8bd1\uff1b<\/p>\n<pre class=\"wp-block-code\"><code>.\/configure --with-http_stub_status_module --with-http_ssl_module\nmake &amp;&amp; make install<\/code><\/pre>\n<p><strong>\u914d\u7f6eNginx<\/strong><\/p>\n<pre class=\"wp-block-code\"><code>server {\n listen 80;\n listen 443 ssl;\n server_name www.you<a href=\"https:\/\/app.applebyme.cn\/shengcheng-113.html\">app\u6253\u5305\u6210apk<\/a>rdomain.com;\n\n ssl_protocols TLSv1.2 TLSv1.1 TLSv1;\n ssl_certificate \/etc\/ssl\/yourdomain.com.crt;\n ssl_certificate_key \/etc\/ssl\/yourdomain.com.key;\n ssl_prefer_server_ciphers on;\n \n #\u81ea\u52a8\u8df3\u8f6c\u5230HTTPS (\u53ef\u9009)\n if ($server_port = 80) {\n r<a href=\"https:\/\/app.applebyme.cn\/shengcheng-35.html\">\u751f\u6210APP<\/a>ewrite ^(.*)$ https:\/\/$host$1 permanent;\n }\n \n location \/ {\n root \/home\/yourdomain\/;\n index index.php;\n }\n}<\/code><\/pre>\n<p>\u8bf7\u5c06\u57df\u540d\u4fee\u6539\u4e3a\u60a8\u81ea\u5df1\u7684<\/p>\n<p>\u4ee5\u4e0a\u914d\u7f6e\u4ec5\u4f9b\u53c2\u8003\uff0c\u5176\u4ed6\u53c2\u6570\u8bf7\u6839\u636e\u751f\u4ea7\u73af\u5883\u9700\u8981\u6dfb\u52a0\u3002\u5b89\u88c5\u540e\u91cd\u542fnginx\u4f7f\u5176\u751f\u6548<\/p>\n<pre class=\"wp-block-code\"><code>centos6\nservice nginx restart\ncentos7\nsystemctl restart nginx<\/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\/4893\/<\/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>\u914d\u7f6e\u4ec5\u4f9b\u53c2\u8003\uff0c\u5176\u4ed6\u53c2\u6570\u8bf7\u6839\u636e\u751f\u4ea7\u73af\u5883\u9700\u8981\u6dfb\u52a0\u3002\u5b89\u88c5\u540e\u91cd\u542fnginx\u4f7f\u5176\u751f\u6548\uff0cNginx\u5b89\u88c5SSL\u8bc1\u4e66 Nginx\u914d\u7f6ehttps\u8bc1\u4e66<\/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":[711,712,713,181,696],"class_list":["post-312","post","type-post","status-publish","format-standard","hentry","category-wwwinfo","tag-nginx","tag-nginxssl","tag-nginxhttps","tag-ssl"],"_links":{"self":[{"href":"https:\/\/app.applebyme.cn\/cloud\/wp-json\/wp\/v2\/posts\/312","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=312"}],"version-history":[{"count":0,"href":"https:\/\/app.applebyme.cn\/cloud\/wp-json\/wp\/v2\/posts\/312\/revisions"}],"wp:attachment":[{"href":"https:\/\/app.applebyme.cn\/cloud\/wp-json\/wp\/v2\/media?parent=312"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/app.applebyme.cn\/cloud\/wp-json\/wp\/v2\/categories?post=312"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/app.applebyme.cn\/cloud\/wp-json\/wp\/v2\/tags?post=312"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}