{"id":1084,"date":"2017-11-12T17:18:19","date_gmt":"2017-11-12T09:18:19","guid":{"rendered":"http:\/\/blog.xiunian.wang\/?p=1084"},"modified":"2017-11-12T17:19:13","modified_gmt":"2017-11-12T09:19:13","slug":"how-to-config-the-free-https-on-nginx","status":"publish","type":"post","link":"https:\/\/blog.xiunian.wang\/?p=1084","title":{"rendered":"How to config the free https on Nginx"},"content":{"rendered":"<p>Recently, I bought an Aliyun server in the Double 11, I want to bind my web domain, but as you know, under the Chinese policy, we have to fill a complicated application. but I found that I can use https to breaking the block. so how to config the free https on Nginx?<\/p>\n<p><!--more--><\/p>\n<p>At first, we should have a domain. then click this link<\/p>\n<p>https:\/\/www.sslforfree.com\/<\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2017\/11\/970402c0bdaa45f6226dae08ef8bd7c2.png\" \/><\/p>\n<p>we choose the Manual Verification because it is the easiest way. we only have to fill some information on the dashboard and add a txt record for it, following the step.<\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2017\/11\/338ebd4196aaa8d0eaa4a5e728cf53a9.png\" \/><\/p>\n<p>the purpose is to verify you are the owner of the domain.<\/p>\n<p>then click next.\u00a0Download SSL Certificate.<\/p>\n<p>we got 3\u00a0 encoded text.<\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2017\/11\/b269a19bc6e90877162f5526e4959a4f.png\" \/><\/p>\n<p>ssh to your Nginx config.<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<pre><code class=\"shell\">mkdir \/etc\/nginx\/ssl\ncd \/etc\/nginx\/ssl\nvi certificate.crt\n<\/code><\/pre>\n<p>copy the Certificate content, pasted the content into the file and save it<\/p>\n<pre><code class=\"shell\">vi private.key\n<\/code><\/pre>\n<p>copy the Private Key content, pasted the content into the file and save it<\/p>\n<pre><code class=\"shell\">vi ca_bundle.crt\n<\/code><\/pre>\n<p>copy the CA Bundle content, pasted the content into the file and save it<\/p>\n<p>combine the certificate.crt and the ca_bundle<\/p>\n<pre><code class=\"shell\">cat certificate.crt ca_bundle.crt &gt;&gt; ca_chain.crt\n<\/code><\/pre>\n<p>the next, edit the Nginx config.<br \/>\nadd a server node like this<\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2017\/11\/16a055ec12d5ef2e974986da66bffd08.png\" \/><\/p>\n<p>run:\u00a0 \u00a0nginx\u00a0-t , if it is ok, then run: server nginx restart,<\/p>\n<p>Finally you can use https to visit your website.<\/p>\n<p>https:\/\/zheer.me<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Recently, I bought an Aliyun server in the Double 11, I want to bind my web domain, but as you know, under the Chinese policy, we have to fill a complicated application. but I found that I can use https to breaking the block. so how to config the free https on Nginx?<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,10],"tags":[],"_links":{"self":[{"href":"https:\/\/blog.xiunian.wang\/index.php?rest_route=\/wp\/v2\/posts\/1084"}],"collection":[{"href":"https:\/\/blog.xiunian.wang\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.xiunian.wang\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.xiunian.wang\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.xiunian.wang\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1084"}],"version-history":[{"count":6,"href":"https:\/\/blog.xiunian.wang\/index.php?rest_route=\/wp\/v2\/posts\/1084\/revisions"}],"predecessor-version":[{"id":1099,"href":"https:\/\/blog.xiunian.wang\/index.php?rest_route=\/wp\/v2\/posts\/1084\/revisions\/1099"}],"wp:attachment":[{"href":"https:\/\/blog.xiunian.wang\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1084"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.xiunian.wang\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1084"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.xiunian.wang\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1084"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}