<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>http &#8211; 記下來</title>
	<atom:link href="https://noter.tw/tag/http/feed/" rel="self" type="application/rss+xml" />
	<link>https://noter.tw</link>
	<description>一路上踩到的坑、遇到的問題，一點一滴記下來，希望能幫助到需要的人~</description>
	<lastBuildDate>Sun, 27 Nov 2022 13:30:40 +0000</lastBuildDate>
	<language>zh-TW</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.6.3</generator>

<image>
	<url>https://noter.tw/wp-content/uploads/cropped-old-1130742_1920-1-32x32.jpg</url>
	<title>http &#8211; 記下來</title>
	<link>https://noter.tw</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>nginx + SSL Certificate &#8211; 讓 http 變身成為 https</title>
		<link>https://noter.tw/3704/nginx-ssl-certificate-%e8%ae%93-http-%e8%ae%8a%e8%ba%ab%e6%88%90%e7%82%ba-https/</link>
					<comments>https://noter.tw/3704/nginx-ssl-certificate-%e8%ae%93-http-%e8%ae%8a%e8%ba%ab%e6%88%90%e7%82%ba-https/#comments</comments>
		
		<dc:creator><![CDATA[黃小蛙]]></dc:creator>
		<pubDate>Fri, 08 Jul 2016 01:56:44 +0000</pubDate>
				<category><![CDATA[Web Server]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[https]]></category>
		<category><![CDATA[http]]></category>
		<category><![CDATA[ssl]]></category>
		<category><![CDATA[SSL For Free]]></category>
		<category><![CDATA[CA]]></category>
		<category><![CDATA[crt]]></category>
		<category><![CDATA[key]]></category>
		<category><![CDATA[nginx]]></category>
		<guid isPermaLink="false">https://wazai.net/?p=3704</guid>

					<description><![CDATA[<p>接續&#160;SSL For Free – 免費又有綠色鎖頭的 SSL Certificates 申請好 SSL Certificate 之後，這篇記錄一下怎麼樣把 SSL Certificate &#46;&#46;&#46;</p>
<p>這篇文章 <a rel="nofollow" href="https://noter.tw/3704/nginx-ssl-certificate-%e8%ae%93-http-%e8%ae%8a%e8%ba%ab%e6%88%90%e7%82%ba-https/" data-wpel-link="internal">nginx + SSL Certificate &#8211; 讓 http 變身成為 https</a> 最早出現於 <a rel="nofollow" href="https://noter.tw" data-wpel-link="internal">記下來</a>。</p>
]]></description>
										<content:encoded><![CDATA[
<p>接續&nbsp;<a rel="noreferrer noopener" aria-label=" (在新分頁中開啟)" href="https://noter.tw/3695/ssl-for-free-%e5%85%8d%e8%b2%bb%e5%8f%88%e6%9c%89%e7%b6%a0%e8%89%b2%e9%8e%96%e9%a0%ad%e7%9a%84-ssl-certificates/" target="_blank" data-wpel-link="internal">SSL For Free – 免費又有綠色鎖頭的 SSL Certificates</a> 申請好 SSL Certificate 之後，這篇記錄一下怎麼樣把 SSL Certificate 加入 nginx 中，讓 http 可以進化成 https。 </p>



<span id="more-3704"></span>



<div class="wp-block-image"><figure class="aligncenter"><a href="https://sshfs.crazyall.net/wazai/2016/07/computer-therms-2-1241965-640x480.jpg" target="_blank" rel="noopener nofollow external noreferrer" data-wpel-link="external"><img decoding="async" src="https://sshfs.crazyall.net/wazai/2016/07/computer-therms-2-1241965-640x480-500x375.jpg" alt="https" class="wp-image-3706" title="nginx + SSL Certificate - 讓 http 變身成為 https"></a><figcaption> 圖片來源：http://tw.freeimages.com/photo/computer-therms-2-1241965 </figcaption></figure></div>



<h2 class="para wp-block-heading">囉哩巴唆</h2>



<p>小蛙剛接觸 nginx 的時候，真是吃盡了苦頭，雖然說功能非常強大，但是有些功能 google 了好久才勉強達到，這裡提供的一些作法也許不是最好，小蛙相信有更優雅的作法，不過至少能達成小蛙的需求，正所謂能解決問題的就是好方法！先達到功能，之後看到更好的作法再慢慢修正。</p>



<h2 class="para wp-block-heading">準備所需的 crt 及 key</h2>



<p>把從&nbsp;<a rel="noreferrer noopener" aria-label=" (在新分頁中開啟)" href="https://noter.tw/3695/ssl-for-free-%e5%85%8d%e8%b2%bb%e5%8f%88%e6%9c%89%e7%b6%a0%e8%89%b2%e9%8e%96%e9%a0%ad%e7%9a%84-ssl-certificates/" target="_blank" data-wpel-link="internal">SSL For Free – 免費又有綠色鎖頭的 SSL Certificates</a>&nbsp;下載回來的 3 個檔案，分別是 ca_bundle.crt, certificate.crt, private.key，接下來我們要將 ca_bundle.crt 與 certificate.crt 合併，如果是用 windows 的話，用筆記本新增一個檔案叫做 bundle.crt，然後分別將 certificate.crt 跟 ca_bundle.crt 這兩個檔案的內容貼進 bundle.crt，要注意有沒有不小心複製到換行，或是空白字元，大概會變成下面這樣</p>



<pre class="wp-block-preformatted wp-block-syntaxhighlighter-code">-----BEGIN CERTIFICATE-----
...
certificate.crt 的內容
...
-----END CERTIFICATE-----
-----BEGIN CERTIFICATE-----
...
ca_bundle.crt 的內容
...
-----END CERTIFICATE-----</pre>



<p>如果像小蛙一樣使用 Linux 的話，可直接輸入</p>



<pre class="wp-block-preformatted wp-block-syntaxhighlighter-code">&gt;cat certificate.crt ca_bundle.crt &gt;&gt; bundle.crt
// 接著用編輯器把以下的魂結斷開
-----END CERTIFICATE----------BEGIN CERTIFICATE-----</pre>



<p>魂結沒有斷開的話，會得到這個錯誤 </p>



<pre class="wp-block-preformatted wp-block-syntaxhighlighter-code">[emerg] 20131#0: PEM_read_bio_X509_AUX("/etc/nginx/ssl/crazyall.net.crt") failed (SSL: error:0906D066:PEM routines:PEM_read_bio:bad end line)</pre>



<p>以小蛙的 nginx 為例，為了不要放檔案太亂，小蛙另外建了 ssl 資料夾，該目錄為 /etc/nginx/ssl/，並且將 bundle.crt 更名為 crazyall.net.crt，private.key 也更名為 crazyall.net.key，如此一來如果有多個網域搭配多個 SSL 會比較方便管理，完成後將 crazyall.net.crt 及 crazyall.net.key 複製到 /etc/nginx/ssl/ 資料夾中。</p>



<h2 class="para wp-block-heading">將 SSL 加入 nginx</h2>



<p>這裡記錄給自己看，預設的 nginx 檔案會包含一小段搭配載入 php5-fpm 的部份，例如：</p>



<pre class="wp-block-preformatted wp-block-syntaxhighlighter-code">location ~ \.php$ {
		fastcgi_split_path_info ^(.+\.php)(/.+)$;
		fastcgi_pass 127.0.0.1:9000;
		fastcgi_read_timeout 120;
		fastcgi_index index.php;
		include fastcgi_params;
}</pre>



<p>如果只有一個網域或一個站，直接這樣就好，但是像小蛙有 crazyall.net 以及 wazai.net 兩個，這一段就會重複，這時候可以把上面的內容獨立成 php.conf 並放在 /etc/nginx/ 資料夾下，接著從 /etc/nginx/sites-avaibale/wazai.net 設定檔中 include php.conf; 就可以了。</p>



<p>wazai.net 的設定部份如下 </p>



<pre class="wp-block-preformatted wp-block-syntaxhighlighter-code">server {
		listen 443 ssl default_server;	 	 
		listen [::]:443 ssl default_server;
		server_name wazai.net;
		ssl_certificate /etc/nginx/ssl/wazai.net.crt;	 	 
		ssl_certificate_key /etc/nginx/ssl/wazai.net.key;	 	 
		... 以下省略 ...	 	 
}</pre>



<p>這裡如果把 crazyall.net 使用一樣的設定就會得到下列錯誤</p>



<pre class="wp-block-preformatted wp-block-syntaxhighlighter-code">[emerg] 20005#0: a duplicate default server for 0.0.0.0:443 in /etc/nginx/sites-enabled/wazai.net:58</pre>



<p>因此如果同一台主機上有不只一個網域要使用 SSL，就要改成下面這樣，加了 default_server 就直接錯給你看</p>



<pre class="wp-block-preformatted wp-block-syntaxhighlighter-code">server {
		listen 443 ssl;
		server_name crazyall.net;
		ssl_certificate /etc/nginx/ssl/crazyall.net.crt;
		ssl_certificate_key /etc/nginx/ssl/crazyall.net.key;
		root /your_www_document;
		index index.php index.html index.htm;
		... 以下省略 ...
}</pre>



<p>經過這些修改 service nginx reload 就可以正常執行囉！試試看 https://your_domain/，如果是用 WordPress 架站的話，還會有很多很多很多問題需要克服，使用 Chrome 的 consloe 可以看到滿山滿谷的 </p>



<div class="wp-block-image"><figure class="aligncenter"><a href="https://sshfs.crazyall.net/wazai/2016/07/chrome_console_ng.png" target="_blank" rel="noopener nofollow external noreferrer" data-wpel-link="external"><img decoding="async" src="https://sshfs.crazyall.net/wazai/2016/07/chrome_console_ng-500x295.png" alt="滿山滿谷的 MixedContent" class="wp-image-3719" title="nginx + SSL Certificate - 讓 http 變身成為 https"></a><figcaption> 滿山滿谷的 MixedContent</figcaption></figure></div>



<p>而且網站打開來之後慘不忍睹， 這也是小蛙為什麼當初卻步的原因，下一篇根據 google 來的資料一一修正這些問題。</p>



<div class="wp-block-image"><figure class="aligncenter is-resized"><a href="https://sshfs.crazyall.net/wazai/2016/07/crazyall.png" target="_blank" rel="noopener nofollow external noreferrer" data-wpel-link="external"><img fetchpriority="high" decoding="async" src="https://sshfs.crazyall.net/wazai/2016/07/crazyall.png" alt="http://crazyall.net" class="wp-image-3720" width="244" height="315" title="nginx + SSL Certificate - 讓 http 變身成為 https"></a><figcaption>正常的都瘋：http://crazyall.net</figcaption></figure></div>



<div class="wp-block-image"><figure class="aligncenter is-resized"><a href="https://sshfs.crazyall.net/wazai/2016/07/crazyallng.png" target="_blank" rel="noopener nofollow external noreferrer" data-wpel-link="external"><img decoding="async" src="https://sshfs.crazyall.net/wazai/2016/07/crazyallng.png" alt="慘不忍睹的都瘋：https://crazyall.net" class="wp-image-3721" width="244" height="314" title="nginx + SSL Certificate - 讓 http 變身成為 https"></a><figcaption>慘的都瘋：https://crazyall.net</figcaption></figure></div>



<h2 class="para wp-block-heading">參考資料</h2>



<ul class="my-li bg-darkblue wp-block-list"><li><a href="https://www.digicert.com/ssl-certificate-installation-nginx.htm" target="_blank" rel="noopener nofollow external noreferrer" data-wpel-link="external" class="wpel-icon-right">Nginx SSL Certificate Installation<span class="wpel-icon wpel-image wpel-icon-6"></span></a></li></ul>



<p><strong>網站架設系列文章：</strong></p>



<ul class="my-li bg-darkblue wp-block-list"><li><a href="https://noter.tw/10151/%e7%9b%a4%e9%bb%9e%e9%82%a3%e4%ba%9b%e6%9b%be%e7%b6%93%e9%99%aa%e4%bc%b4%e9%81%8e%e5%b0%8f%e8%9b%99%e7%9a%84-vps-%e8%99%9b%e6%93%ac%e4%b8%bb%e6%a9%9f/" data-wpel-link="internal">盤點那些曾經陪伴過小蛙的 VPS 虛擬主機</a></li><li><a href="https://noter.tw/176/%e5%a6%82%e4%bd%95%e6%8c%91%e9%81%b8-vps-%e6%9c%80%e5%88%92%e7%ae%97%e7%9a%84%e8%b2%b7%e6%b3%95/" data-wpel-link="internal">如何挑選 VPS + 最划算的買法</a></li><li><a href="https://noter.tw/406/%E6%89%8B%E6%8A%8A%E6%89%8B%E6%95%99%E4%BD%A0%E5%A6%82%E4%BD%95%E8%B3%BC%E8%B2%B7-vps/" data-wpel-link="internal">手把手教你如何購買 VPS</a></li><li><a href="https://noter.tw/4463/第一次買-kvm-虛擬主機/" data-wpel-link="internal">第一次買 KVM 虛擬主機</a></li><li><a href="https://noter.tw/4242/%e8%a1%80%e7%9a%84%e6%95%99%e8%a8%93-hiformance-%e8%b7%91%e8%b7%af%e4%ba%86/" data-wpel-link="internal">血的教訓 &#8211; HiFormance 跑路了 &#8230;</a></li><li><a href="https://noter.tw/196/%e7%82%ba%e8%87%aa%e5%b7%b1%e7%94%b3%e8%ab%8b%e4%b8%80%e5%80%8b%e5%9f%9f%e5%90%8d-hinet-%e7%82%ba%e4%be%8b/" data-wpel-link="internal">為自己申請一個域名 – HiNet 為例</a></li><li><a href="https://noter.tw/117/cloudflare-%E8%B6%85%E5%BC%B7%E5%A4%A7%E7%9A%84%E5%85%8D%E8%B2%BB-cdn/" data-wpel-link="internal">Cloudflare – 超強大的免費 CDN (?)</a></li><li><a href="https://noter.tw/195/%e4%bd%bf%e7%94%a8-cloudflare-%e4%bb%a3%e7%ae%a1%e4%bd%a0%e7%9a%84%e5%9f%9f%e5%90%8d/" data-wpel-link="internal">使用 Cloudflare 代管你的域名</a></li><li><a href="https://noter.tw/396/ubuntu-16-04-設定環境語言編碼，讓中文可以正常顯示/" data-wpel-link="internal">Ubuntu 16.04 設定環境語言編碼，讓中文可以正常顯示</a></li><li><a href="https://noter.tw/255/ubuntu-16-04-%e5%ae%89%e8%a3%9d-fail2ban/" data-wpel-link="internal">Ubuntu 16.04 安裝 fail2ban</a></li><li><a href="https://noter.tw/436/%E4%B8%80%E5%80%8B%E8%85%B3%E6%9C%AC%E6%AF%8F%E5%A4%A9%E8%87%AA%E5%8B%95%E5%82%99%E4%BB%BD/" data-wpel-link="internal">一個腳本每天自動備份</a></li><li><a href="https://noter.tw/32/linux-tar-%E5%AE%8C%E6%95%B4%E5%82%99%E4%BB%BD%E3%80%81%E5%A2%9E%E9%87%8F%E5%82%99%E4%BB%BD%E5%8F%8A%E5%B7%AE%E7%95%B0%E5%82%99%E4%BB%BD%E6%AF%94%E8%BC%83/" data-wpel-link="internal">Linux tar 完整備份、增量備份及差異備份比較</a></li><li><a href="https://noter.tw/3704/nginx-ssl-certificate-%E8%AE%93-http-%E8%AE%8A%E8%BA%AB%E6%88%90%E7%82%BA-https/" data-wpel-link="internal">nginx + SSL Certificate – 讓 http 變身成為 https</a></li><li><a href="https://noter.tw/3695/ssl-for-free-%E5%85%8D%E8%B2%BB%E5%8F%88%E6%9C%89%E7%B6%A0%E8%89%B2%E9%8E%96%E9%A0%AD%E7%9A%84-ssl-certificates/" data-wpel-link="internal">SSL For Free – 免費又有綠色鎖頭的 SSL Certificates</a></li><li><a href="https://noter.tw/8596/certbot-error/" data-wpel-link="internal">Certbot 申請 SSL certificate 錯誤問題</a></li><li><a href="https://noter.tw/9107/certbot-error-acmev1-is-deprecated/" data-wpel-link="internal">Certbot 錯誤：ACMEv1 is deprecated and you can …</a></li><li><a href="https://noter.tw/5967/ubuntu-18-04-%e5%ae%89%e8%a3%9d-awstats-%e4%be%86%e7%b5%b1%e8%a8%88%e7%b6%b2%e7%ab%99%e6%b5%81%e9%87%8f/" data-wpel-link="internal">Ubuntu 18.04 安裝 AWStats 來統計網站流量</a></li><li><a href="https://noter.tw/9287/pchome-%e8%b2%b7%e7%b6%b2%e5%9d%80%e7%ba%8c%e7%b4%84%e6%b5%81%e7%a8%8b/" data-wpel-link="internal">PCHome 買網址續約流程</a></li></ul>
<p>這篇文章 <a rel="nofollow" href="https://noter.tw/3704/nginx-ssl-certificate-%e8%ae%93-http-%e8%ae%8a%e8%ba%ab%e6%88%90%e7%82%ba-https/" data-wpel-link="internal">nginx + SSL Certificate &#8211; 讓 http 變身成為 https</a> 最早出現於 <a rel="nofollow" href="https://noter.tw" data-wpel-link="internal">記下來</a>。</p>
]]></content:encoded>
					
					<wfw:commentRss>https://noter.tw/3704/nginx-ssl-certificate-%e8%ae%93-http-%e8%ae%8a%e8%ba%ab%e6%88%90%e7%82%ba-https/feed/</wfw:commentRss>
			<slash:comments>4</slash:comments>
		
		
			</item>
		<item>
		<title>SSL For Free &#8211; 免費又有綠色鎖頭的 SSL Certificates</title>
		<link>https://noter.tw/3695/ssl-for-free-%e5%85%8d%e8%b2%bb%e5%8f%88%e6%9c%89%e7%b6%a0%e8%89%b2%e9%8e%96%e9%a0%ad%e7%9a%84-ssl-certificates/</link>
					<comments>https://noter.tw/3695/ssl-for-free-%e5%85%8d%e8%b2%bb%e5%8f%88%e6%9c%89%e7%b6%a0%e8%89%b2%e9%8e%96%e9%a0%ad%e7%9a%84-ssl-certificates/#respond</comments>
		
		<dc:creator><![CDATA[黃小蛙]]></dc:creator>
		<pubDate>Thu, 07 Jul 2016 15:00:54 +0000</pubDate>
				<category><![CDATA[Web Server]]></category>
		<category><![CDATA[免費資源]]></category>
		<category><![CDATA[軟體、工具]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[https]]></category>
		<category><![CDATA[certificate]]></category>
		<category><![CDATA[http]]></category>
		<category><![CDATA[seo]]></category>
		<category><![CDATA[ssl]]></category>
		<category><![CDATA[SSL For Free]]></category>
		<category><![CDATA[nginx]]></category>
		<guid isPermaLink="false">https://wazai.net/?p=3695</guid>

					<description><![CDATA[<p>之前聽說 Google 會優先搜尋有 https 的網頁 (參考：SEO優化：Google 調整SEO演算法，優先搜尋HTTPS網頁)，一直想把蛙齋也加入 SSL Certificate，一想到設定上&#46;&#46;&#46;</p>
<p>這篇文章 <a rel="nofollow" href="https://noter.tw/3695/ssl-for-free-%e5%85%8d%e8%b2%bb%e5%8f%88%e6%9c%89%e7%b6%a0%e8%89%b2%e9%8e%96%e9%a0%ad%e7%9a%84-ssl-certificates/" data-wpel-link="internal">SSL For Free &#8211; 免費又有綠色鎖頭的 SSL Certificates</a> 最早出現於 <a rel="nofollow" href="https://noter.tw" data-wpel-link="internal">記下來</a>。</p>
]]></description>
										<content:encoded><![CDATA[
<p>之前聽說 Google 會優先搜尋有 https 的網頁 (參考：<a rel="noreferrer noopener nofollow external" href="http://seo.techroomage.com/2015/12/seo-optimization-google-change-seo-https.html" target="_blank" data-wpel-link="external" class="wpel-icon-right">SEO優化：Google 調整SEO演算法，優先搜尋HTTPS網頁<span class="wpel-icon wpel-image wpel-icon-6"></span></a>)，一直想把蛙齋也加入 SSL Certificate，一想到設定上的麻煩就卻步了，趁這次換 VPS 的時候，一次痛到底吧！印象中同事推薦過 <a rel="noreferrer noopener nofollow external" href="https://www.sslforfree.com/" target="_blank" data-wpel-link="external" class="wpel-icon-right">SSL For Free<span class="wpel-icon wpel-image wpel-icon-6"></span></a> 這個網站，而且可以有綠色鎖頭喔！於是抽空進行將網站加入 SSL 的工作！ </p>



<span id="more-3695"></span>



<div class="wp-block-image"><figure class="aligncenter"><a href="https://sshfs.crazyall.net/wazai/2016/07/sslforfree.png" target="_blank" rel="noopener nofollow external noreferrer" data-wpel-link="external"><img decoding="async" src="https://sshfs.crazyall.net/wazai/2016/07/sslforfree-500x311.png" alt="SSL For Free" class="wp-image-3697" title="SSL For Free - 免費又有綠色鎖頭的 SSL Certificates"></a><figcaption> 連結：https://www.sslforfree.com/ </figcaption></figure></div>



<h2 class="para wp-block-heading">囉哩巴唆</h2>



<p>Google 竟然把有 https 的網頁優先搜尋，看來加入 SSL 是勢在必行了，應該是因為跟 Google 自己後來想推的協定有關，不過看著 <a href="https://sofree.cc/" target="_blank" rel="noreferrer noopener nofollow external" data-wpel-link="external" class="wpel-icon-right">香腸炒魷魚<span class="wpel-icon wpel-image wpel-icon-6"></span></a>、<a href="https://briian.com/" target="_blank" rel="noreferrer noopener nofollow external" data-wpel-link="external" class="wpel-icon-right">重灌狂人<span class="wpel-icon wpel-image wpel-icon-6"></span></a> &#8230; 等一些知名網站也都已經是 https 開頭的了，這個趨勢只能跟風了！來個維基百科解釋一下這到底是什麼碗糕：</p>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow"><p>傳輸層安全協議（英語：Transport Layer Security，縮寫：TLS），及其前身安全通訊協定（Secure Sockets Layer，縮寫：SSL）是一種安全協定，目的是為網際網路通訊，提供安全及資料完整性保障。from&nbsp;<a href="https://zh.wikipedia.org/wiki/%E8%B6%85%E6%96%87%E6%9C%AC%E4%BC%A0%E8%BE%93%E5%AE%89%E5%85%A8%E5%8D%8F%E8%AE%AE" target="_blank" rel="noreferrer noopener nofollow external" data-wpel-link="external" class="wpel-icon-right">傳輸層安全協議 &#8211; 維基百科<span class="wpel-icon wpel-image wpel-icon-6"></span></a><br>超文字傳輸安全協定（英語：Hypertext Transfer Protocol Secure，縮寫：HTTPS，也被稱為HTTP over TLS，HTTP over SSL或HTTP Secure）是一種網路安全傳輸協議。在計算機網路上，HTTPS經由超文字傳輸協定進行通訊，但利用SSL/TLS來對封包進行加密。HTTPS開發的主要目的，是提供對網路伺服器的身分認證，保護交換資料的隱私與完整性。 from&nbsp;<a href="https://zh.wikipedia.org/wiki/%E8%B6%85%E6%96%87%E6%9C%AC%E4%BC%A0%E8%BE%93%E5%AE%89%E5%85%A8%E5%8D%8F%E8%AE%AE" target="_blank" rel="noreferrer noopener nofollow external" data-wpel-link="external" class="wpel-icon-right">超文字傳輸安全協定 &#8211; 維基百科<span class="wpel-icon wpel-image wpel-icon-6"></span></a></p></blockquote>



<p>好的，有看沒有懂或是覺得翻譯很奇怪，沒關係不重要，只要知道是對安全性有幫助的東西就好了！之前查了很多加入 SSL 的方法，以小蛙的智商實在是很難理解，也很佩服那些能做這些事情的人 &gt;&lt; 真正促使小蛙將蛙齋改成 https 是因為看到 SSL For Free 的使用方式真的很簡單，連小蛙這種系統白癡都可以順利完成，ㄟ &#8230; 好啦！在 nginx 設定上，還有一些觀念的理解上花了一些時間。</p>



<h2 class="para wp-block-heading">SSL For Free 申請</h2>



<p>主要有幾個步驟：(過程可參考：<a href="https://free.com.tw/ssl-for-free/" target="_blank" rel="noreferrer noopener nofollow external" data-wpel-link="external" class="wpel-icon-right">SSL For Free 免費 SSL 憑證申請，使用 Let’s Encrypt 最簡單方法教學！<span class="wpel-icon wpel-image wpel-icon-6"></span></a>)</p>



<ul class="my-li bg-darkblue wp-block-list"><li>在 <a rel="noreferrer noopener nofollow external" href="https://www.sslforfree.com/" target="_blank" data-wpel-link="external" class="wpel-icon-right">SSL For Free<span class="wpel-icon wpel-image wpel-icon-6"></span></a> 上註冊一個帳號。</li><li>在首頁輸入要申請的網域名稱。像小蛙要申請 crazyall.net 這個網域，系統會自動產生 www.crazyall.net 跟 crazyall.net 這兩個網域。</li><li>選擇「Manually Verify Domain」進行手動認證網域。</li><li>下載網頁給的兩個檔案，把它們放在你的網域目錄 /.well-known/acme-challenge/ 資料夾下，放好之後點選下面的連結，看看是不是能夠讀取到這兩個檔案，確定可以讀取之後才點選「Download SSL Certificate」，不然如果驗證失敗，系統會產生另外的兩個檔案，然後要一直重複步驟 2 ~ 4。</li><li>點選「Download All SSL Certificate Files」下載所有檔案並保存好。</li></ul>



<p>到這邊就完成囉！nginx 設定部份請參考 <a href="https://noter.tw/3704/nginx-ssl-certificate-%e8%ae%93-http-%e8%ae%8a%e8%ba%ab%e6%88%90%e7%82%ba-https/" target="_blank" rel="noreferrer noopener" aria-label=" (在新分頁中開啟)" data-wpel-link="internal">nginx + SSL Certificate &#8211; 讓 http 變身成為 https</a>。</p>



<h2 class="para wp-block-heading">參考資料</h2>



<ul class="my-li bg-darkblue wp-block-list"><li><a href="https://www.sslforfree.com/" target="_blank" rel="noopener nofollow external noreferrer" data-wpel-link="external" class="wpel-icon-right">SSL For Free<span class="wpel-icon wpel-image wpel-icon-6"></span></a></li><li><a href="http://seo.techroomage.com/2015/12/seo-optimization-google-change-seo-https.html" target="_blank" rel="noopener nofollow external noreferrer" data-wpel-link="external" class="wpel-icon-right">SEO優化：Google 調整SEO演算法，優先搜尋HTTPS網頁<span class="wpel-icon wpel-image wpel-icon-6"></span></a></li><li><a href="https://noter.tw/3695/ssl-for-free-%e5%85%8d%e8%b2%bb%e5%8f%88%e6%9c%89%e7%b6%a0%e8%89%b2%e9%8e%96%e9%a0%ad%e7%9a%84-ssl-certificates/" data-wpel-link="internal">SSL For Free – 免費又有綠色鎖頭的 SSL Certificates</a></li></ul>



<p><strong>網站架設系列文章：</strong></p>



<ul class="my-li bg-darkblue wp-block-list"><li><a href="https://noter.tw/10151/%e7%9b%a4%e9%bb%9e%e9%82%a3%e4%ba%9b%e6%9b%be%e7%b6%93%e9%99%aa%e4%bc%b4%e9%81%8e%e5%b0%8f%e8%9b%99%e7%9a%84-vps-%e8%99%9b%e6%93%ac%e4%b8%bb%e6%a9%9f/" data-wpel-link="internal">盤點那些曾經陪伴過小蛙的 VPS 虛擬主機</a></li><li><a href="https://noter.tw/176/%e5%a6%82%e4%bd%95%e6%8c%91%e9%81%b8-vps-%e6%9c%80%e5%88%92%e7%ae%97%e7%9a%84%e8%b2%b7%e6%b3%95/" data-wpel-link="internal">如何挑選 VPS + 最划算的買法</a></li><li><a href="https://noter.tw/406/%E6%89%8B%E6%8A%8A%E6%89%8B%E6%95%99%E4%BD%A0%E5%A6%82%E4%BD%95%E8%B3%BC%E8%B2%B7-vps/" data-wpel-link="internal">手把手教你如何購買 VPS</a></li><li><a href="https://noter.tw/4463/第一次買-kvm-虛擬主機/" data-wpel-link="internal">第一次買 KVM 虛擬主機</a></li><li><a href="https://noter.tw/4242/%e8%a1%80%e7%9a%84%e6%95%99%e8%a8%93-hiformance-%e8%b7%91%e8%b7%af%e4%ba%86/" data-wpel-link="internal">血的教訓 &#8211; HiFormance 跑路了 &#8230;</a></li><li><a href="https://noter.tw/196/%e7%82%ba%e8%87%aa%e5%b7%b1%e7%94%b3%e8%ab%8b%e4%b8%80%e5%80%8b%e5%9f%9f%e5%90%8d-hinet-%e7%82%ba%e4%be%8b/" data-wpel-link="internal">為自己申請一個域名 – HiNet 為例</a></li><li><a href="https://noter.tw/117/cloudflare-%E8%B6%85%E5%BC%B7%E5%A4%A7%E7%9A%84%E5%85%8D%E8%B2%BB-cdn/" data-wpel-link="internal">Cloudflare – 超強大的免費 CDN (?)</a></li><li><a href="https://noter.tw/195/%e4%bd%bf%e7%94%a8-cloudflare-%e4%bb%a3%e7%ae%a1%e4%bd%a0%e7%9a%84%e5%9f%9f%e5%90%8d/" data-wpel-link="internal">使用 Cloudflare 代管你的域名</a></li><li><a href="https://noter.tw/396/ubuntu-16-04-設定環境語言編碼，讓中文可以正常顯示/" data-wpel-link="internal">Ubuntu 16.04 設定環境語言編碼，讓中文可以正常顯示</a></li><li><a href="https://noter.tw/255/ubuntu-16-04-%e5%ae%89%e8%a3%9d-fail2ban/" data-wpel-link="internal">Ubuntu 16.04 安裝 fail2ban</a></li><li><a href="https://noter.tw/436/%E4%B8%80%E5%80%8B%E8%85%B3%E6%9C%AC%E6%AF%8F%E5%A4%A9%E8%87%AA%E5%8B%95%E5%82%99%E4%BB%BD/" data-wpel-link="internal">一個腳本每天自動備份</a></li><li><a href="https://noter.tw/32/linux-tar-%E5%AE%8C%E6%95%B4%E5%82%99%E4%BB%BD%E3%80%81%E5%A2%9E%E9%87%8F%E5%82%99%E4%BB%BD%E5%8F%8A%E5%B7%AE%E7%95%B0%E5%82%99%E4%BB%BD%E6%AF%94%E8%BC%83/" data-wpel-link="internal">Linux tar 完整備份、增量備份及差異備份比較</a></li><li><a href="https://noter.tw/3704/nginx-ssl-certificate-%E8%AE%93-http-%E8%AE%8A%E8%BA%AB%E6%88%90%E7%82%BA-https/" data-wpel-link="internal">nginx + SSL Certificate – 讓 http 變身成為 https</a></li><li><a href="https://noter.tw/3695/ssl-for-free-%E5%85%8D%E8%B2%BB%E5%8F%88%E6%9C%89%E7%B6%A0%E8%89%B2%E9%8E%96%E9%A0%AD%E7%9A%84-ssl-certificates/" data-wpel-link="internal">SSL For Free – 免費又有綠色鎖頭的 SSL Certificates</a></li><li><a href="https://noter.tw/8596/certbot-error/" data-wpel-link="internal">Certbot 申請 SSL certificate 錯誤問題</a></li><li><a href="https://noter.tw/9107/certbot-error-acmev1-is-deprecated/" data-wpel-link="internal">Certbot 錯誤：ACMEv1 is deprecated and you can …</a></li><li><a href="https://noter.tw/5967/ubuntu-18-04-%e5%ae%89%e8%a3%9d-awstats-%e4%be%86%e7%b5%b1%e8%a8%88%e7%b6%b2%e7%ab%99%e6%b5%81%e9%87%8f/" data-wpel-link="internal">Ubuntu 18.04 安裝 AWStats 來統計網站流量</a></li><li><a href="https://noter.tw/9287/pchome-%e8%b2%b7%e7%b6%b2%e5%9d%80%e7%ba%8c%e7%b4%84%e6%b5%81%e7%a8%8b/" data-wpel-link="internal">PCHome 買網址續約流程</a></li></ul>
<p>這篇文章 <a rel="nofollow" href="https://noter.tw/3695/ssl-for-free-%e5%85%8d%e8%b2%bb%e5%8f%88%e6%9c%89%e7%b6%a0%e8%89%b2%e9%8e%96%e9%a0%ad%e7%9a%84-ssl-certificates/" data-wpel-link="internal">SSL For Free &#8211; 免費又有綠色鎖頭的 SSL Certificates</a> 最早出現於 <a rel="nofollow" href="https://noter.tw" data-wpel-link="internal">記下來</a>。</p>
]]></content:encoded>
					
					<wfw:commentRss>https://noter.tw/3695/ssl-for-free-%e5%85%8d%e8%b2%bb%e5%8f%88%e6%9c%89%e7%b6%a0%e8%89%b2%e9%8e%96%e9%a0%ad%e7%9a%84-ssl-certificates/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
