Board logo

標題: LetsEncrypt為網站加密全紀錄 [打印本頁]

作者: pipikeung    時間: 2020-12-18 19:35     標題: LetsEncrypt為網站加密全紀錄

使用LetsEncrypt為Apache2網站加密(ssl)

早前建個示範網站﹕http://pipikeung.tplinkdns.com發覺TP-LINK的DNS反應時間癈癈地,比較慢。所以換個DDNS,使用dnsalias.net為綱域,網站變成﹕http://pipikeung.dnsalias.net

然後用LetsEncrypt為網站加密成為﹕https://pipikeung.dnsalias.net方法大略如下

01 安裝certbot
   apt-apt install software-properties-common
   add-apt-repository ppa:cerbot/certbot
   add-apt-repository universe
   apt-get install cerbot python-certbot-apache apache2
   
02 取得認證
   sudo certbot -- apache
   
   
   
03 成功取證,網頁截圖﹕

   
   

04 最後為使http://pipikeung.tplinkdns.com仍然可用,將其轉址到https://pipikeung.dnsalias.net

有興趣可瀏灠https://pipikeung.dnsalias.net 歡迎指正﹗

因重未使用過Lets Encrypt,今次發覺原來比想像簡單,但要三個月做一次更新,好彩更新十分方便,算是一種好的體驗。

更新方法﹕

   certbot renew
   重新reload伺服器﹕
   service apache2 reload
   或
   systemctl reload apache2





歡迎光臨 電腦領域 HKEPC Hardware (https://h2.hkepc.com/forum/) Powered by Discuz! 7.2