<?xml version="1.0" encoding="UTF-8" ?><oembed><version>1.0</version><provider_name>Jui-Nan Lin&#039;s Blog</provider_name><provider_url>https://jnlin.org</provider_url><author_name>jnlin</author_name><author_url>https://jnlin.org/author/jnlin/</author_url><title>安裝 Let&#039;s Encrypt 的憑證與支援 HTTP/2</title><html>昨天花了一個多小時的時間，申請了 &lt;a href=&quot;https://letsencrypt.org/&quot;&gt;Let&#039;s Encrypt&lt;/a&gt; 的憑證並更新上去，並且升級到 Apache 2.4.17 來安裝 HTTP/2 Module。

Let&#039;s Encrypt 使用的 ACME Client 程式，目前有實驗性的支援 FreeBSD，基本上按照信件中的說明安裝即可。如果是 FreeBSD 9.x 的話，需要按照這個 &lt;a href=&quot;https://github.com/letsencrypt/letsencrypt/issues/1332&quot;&gt;GitHub Issue&lt;/a&gt; 的方式，自行編譯 trunk 版本的 &lt;a href=&quot;https://github.com/pyca/cryptography&quot;&gt;pyca/cryptography&lt;/a&gt;，即可完成 ACME Client 的安裝。

安裝完成後，可以指定 webroot 當作認證檔案存放的位置，來給 Let&#039;s Encrypt 驗證這個網域確實是申請人所有：

&lt;code&gt;
./letsencrypt-auto --agree-dev-preview --server https://acme-v01.api.letsencrypt.org/directory -a webroot --webroot-path /home/data/websites/jnlin.org/webroot certonly
&lt;/code&gt;

簽好的憑證會放在 /etc/letsencrypt/ 裡面，效期 90 天。官方建議每 60 天 renew 一次。我自己打算先手動 renew 一次，沒問題的話就丟到 cron 裡面，兩個月自動 renew 一次。

安裝 Apache 2.4 + HTTP/2 Module 就沒什麼特別的，直接 ports 安裝，結束之後，把憑證設定上去，即可打開 HTTP/2 的功能。反倒是解決 Wordpress 的 mixed content 問題花了比較多時間 XD</html><type>rich</type></oembed>