{"id":2008,"date":"2018-03-19T00:00:10","date_gmt":"2018-03-18T16:00:10","guid":{"rendered":"https:\/\/cloudbool.com\/archive\/?p=350"},"modified":"2018-03-19T00:00:10","modified_gmt":"2018-03-18T16:00:10","slug":"tencent-cloud-free-ssl-certificate-install","status":"publish","type":"post","link":"https:\/\/cloudbool.com\/archive\/tencent-cloud-free-ssl-certificate-install.html","title":{"rendered":"\u817e\u8baf\u4e91\u514d\u8d39SSL\u8bc1\u4e66\u5b89\u88c5"},"content":{"rendered":"<p>\u4e4b\u524d\u4e5f\u63d0\u5230\u8fc7\uff0c\u817e\u8baf\u4e91\u7ed9\u6211\u9001\u4e86\u4e2a2000\u5143\u7684\u901a\u7528\u4f18\u60e0\u5238\uff0c\u4e70\u4e86\u4e2a\u4e09\u5e74\u7684\u670d\u52a1\u5668\u4e4b\u540e\uff0c\u8fd8\u5269400\u591a\uff0c\u53c8\u5feb\u5230\u671f\u4e86\uff0c\u4e8e\u662f\u5c31\u5728\u817e\u8baf\u4e91\u6ce8\u518c\u4e86\u4e2a5\u5e74\u7684\u57df\u540d\uff0c\u4e5f\u5c31\u662f\u73b0\u5728\u6b63\u5728\u4f7f\u7528\u7684\u8fd9\u4e2a\u3002\u672c\u6765\u6211\u90fd\u6253\u7b97\u4f7f\u7528letsencrypt\u7684\u514d\u8d39SSL\uff0c\u4f46\u662f\u770b\u5230\u817e\u8baf\u4e91\u8fd9\u4e48\u6177\u6168\u7ed9\u6211\u9001\u4e86\u4e00\u4e2a\u514d\u8d39\u4e00\u5e74\u7684\uff0c\u5c31\u60f3\u7740\u80fd\u4e0d\u80fd\u6298\u817e\u4e00\u4e0b\u4e86\u3002<br \/>\n<!--more--><br \/>\n\u8bf4\u5b9e\u8bdd\uff0c\u6211\u4e5f\u4e0d\u77e5\u9053\u8fd9\u4e2a\u8bc1\u4e66\u4ec0\u4e48\u65f6\u5019\u9001\u7ed9\u6211\u4e86\uff0c\u7533\u8bf7\u5b8c\u5c31\u8bf4\u6709\u4e86\uff0c\u627e\u4e86\u627e\u5728\u4e0b\u62c9\u7684SSL\u8bc1\u4e66\u7ba1\u7406\u9875\u9762\u80fd\u627e\u5230\uff0c\u6216\u8005\u76f4\u63a5\u70b9\u8fd9\u4e2a\u5730\u5740\uff1ahttps:\/\/console.cloud.tencent.com\/ssl<br \/>\n\u4e0b\u8f7d\u4e4b\u540e\u89e3\u538b\uff0c\u91cc\u9762\u6709\u51e0\u4e2a\u6587\u4ef6\u5939\uff0c\u56e0\u4e3a\u6211\u7528\u7684Nginx\uff0c\u53ea\u9700\u8981\u7528\u5230Nginx\u6587\u4ef6\u5939\u91cc\u9762\u7684\u4e24\u4e2a\u6587\u4ef6\u3002\u5c06\u5176\u590d\u5236\u5230\u5408\u9002\u7684\u5730\u65b9\uff0c\u6bd4\u5982\u8bf4<strong>\/var\/www\/ssl<\/strong>\uff0c\u7136\u540e\u65b0\u5efaNginx\u914d\u7f6e\u6587\u4ef6\uff0c\u5e76\u590d\u5236\u4ee5\u4e0b\u5185\u5bb9\u8fdb\u53bb\uff1a<\/p>\n<pre><code>vim \/etc\/nginx\/conf.d\/elsenow.conf\nserver {\n    server_name cloudbool.com;\n    listen   443 ssl http2;\n    ssl_protocols TLSv1.2 TLSv1.1 TLSv1;\n    ssl_certificate \/var\/www\/ssl\/1_cloudbool.com_bundle.crt;\n    ssl_certificate_key \/var\/www\/ssl\/2_cloudbool.com.key;\n    ssl_session_cache        shared:SSL:10m;\n    ssl_session_timeout      60m;\n    ssl_session_tickets      on;\n    ssl_stapling             on;\n    ssl_stapling_verify      on;\n    resolver                 8.8.4.4 8.8.8.8  valid=300s;\n    resolver_timeout         10s;\n    root \/var\/www\/xxx;\n    index index.html index.php index.htm;\n    location \/ {\n        try_files $uri $uri\/ \/index.php?$args;\n    }\n    client_max_body_size    4m;\n    access_log \/var\/log\/nginx\/elsenow.log;\n    error_log \/var\/log\/nginx\/error.elsenow.log;\n    error_page 404 \/404.html;\n    error_page 500 502 503 504 \/50x.html;\n    location = \/50x.html {\n        root \/usr\/share\/nginx\/html;\n    }\n    location ~ \\.php$ {\n        try_files $uri \/index.php =404;\n        fastcgi_split_path_info ^(.+\\.php)(\/.+)$;\n        fastcgi_pass 127.0.0.1:9000;\n        fastcgi_index index.php;\n        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;\n        include fastcgi_params;\n    }\n}\nserver {\n    listen 80;\n    server_name cloudbool.com www.cloudbool.com;\n    location \/ {\n        rewrite ^\/(.*)$ https:\/\/cloudbool.com\/archive\/$1 permanent;\n    }\n}\n<\/code><\/pre>\n<p>\u7136\u540e<strong>nginx -t<\/strong>\u4e00\u4e0b\uff0c\u68c0\u67e5\u914d\u7f6e\u662f\u5426\u6b63\u786e\uff0c\u5982\u679c\u6ca1\u95ee\u9898\uff0c\u91cd\u542f\u4e00\u4e0bNginx\u5c31\u884c\u4e86\u3002<br \/>\n<img decoding=\"async\" src=\"https:\/\/cloudbool.com\/archive\/wp-content\/uploads\/2018\/03\/tencent-cloud-free-ssl-certificate-2.png\" alt=\"tencent-cloud-free-ssl-certificate\" \/><br \/>\n\u53ef\u4ee5\u770b\u51fa\uff0c\u5df2\u7ecf\u662f\u4e9a\u6d32\u8bda\u4fe1\u7684\u8bc1\u4e66\u4e86\uff0c\u6709\u6548\u671f\u662f1\u5e74\uff0c\u4e0d\u77e5\u9053\u5230\u65f6\u5019\u7ed9\u4e0d\u7ed9\u7eed\u4e86\u3002<br \/>\n\u7136\u800c\uff0c\u6211\u8fd8\u662f\u89c9\u5f97letsencrypt\u597d\u4f7f\uff0c\u867d\u7136\u4e09\u4e2a\u6708\u7eed\u4e00\u6b21\u6709\u70b9\u9ebb\u70e6\uff0c\u6bd5\u7adf\u867d\u7136\u90fd\u662f\u514d\u8d39\u7684\uff0c\u4f46\u662fletsencrypt\u611f\u89c9\u66f4\u6709\u903c\u683c\u54c8\u54c8\u54c8\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4e4b\u524d\u4e5f\u63d0\u5230\u8fc7\uff0c\u817e\u8baf\u4e91\u7ed9\u6211\u9001\u4e86\u4e2a2000\u5143\u7684\u901a\u7528\u4f18\u60e0\u5238\uff0c\u4e70\u4e86\u4e2a\u4e09\u5e74\u7684\u670d\u52a1\u5668\u4e4b\u540e\uff0c\u8fd8\u5269400\u591a\uff0c\u53c8\u5feb\u5230\u671f\u4e86\uff0c\u4e8e\u662f\u5c31 &hellip;<\/p>\n<p class=\"read-more\"> <a class=\"\" href=\"https:\/\/cloudbool.com\/archive\/tencent-cloud-free-ssl-certificate-install.html\"> <span class=\"screen-reader-text\">\u817e\u8baf\u4e91\u514d\u8d39SSL\u8bc1\u4e66\u5b89\u88c5<\/span> \u67e5\u770b\u5168\u6587 &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""}},"footnotes":""},"categories":[13],"tags":[76,100],"class_list":["post-2008","post","type-post","status-publish","format-standard","hentry","category-default","tag-nginx","tag-ssl"],"_links":{"self":[{"href":"https:\/\/cloudbool.com\/archive\/wp-json\/wp\/v2\/posts\/2008","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cloudbool.com\/archive\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cloudbool.com\/archive\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cloudbool.com\/archive\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/cloudbool.com\/archive\/wp-json\/wp\/v2\/comments?post=2008"}],"version-history":[{"count":0,"href":"https:\/\/cloudbool.com\/archive\/wp-json\/wp\/v2\/posts\/2008\/revisions"}],"wp:attachment":[{"href":"https:\/\/cloudbool.com\/archive\/wp-json\/wp\/v2\/media?parent=2008"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cloudbool.com\/archive\/wp-json\/wp\/v2\/categories?post=2008"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cloudbool.com\/archive\/wp-json\/wp\/v2\/tags?post=2008"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}