關於acme.sh
的詳細說明可以看 [這裡][1]
因為我的 nginx 的配置文件非常混亂,所以我採用的是關掉 nginx,讓 acme.sh 自己作為伺服器的方式來驗證
首先需要安裝 socat
apt install socat
然後
acme.sh --issue -d zhufn.fun --standalone
生成好的證書會自動放到 nginx 的文件夾裡,好神奇
![ ][2]
後來發現一個證書可以對應多個域名
於是
acme.sh --issue -d zhufn.fun -d rss.zhufn.fun -d tb.zhufn.fun -d i.zhufn.fun --standalone
然後改改 nginx 裡的路徑,就可以共用一個證書啦
[1]: https://github.com/acmesh-official/acme.sh/wiki/%E8%AF%B4%E6%98%8E
[2]: https://s2.ax1x.com/2020/02/03/1aCQkF.png