certbot以nginx方式爲域名加https證書

ubuntu16.04 server下

1、添加源
sudo add-apt-repository ppa:certbot/certbot

如果報命令 add-apt-repository 找不到,運行 sudo apt-get install -y software-properties-common python-software-properties
再執行上述命令

2、更新
sudo apt-get update
3、安裝相關包
sudo apt-get install -y certbot python-certbot-nginx
4、首次運行時配置certbot
certbot --nginx

按照提示輸入郵箱、a(同意軟件協議)、y
後續就會自動尋找需要加https的域名,也可以手動輸入
在這裏插入圖片描述

ubuntu18.04 server下

1、更新
sudo apt update
2、安裝相關包
sudo apt install -y certbot python-certbot-nginx
3、首次運行時配置certbot
certbot --nginx

按照提示輸入郵箱、a(同意軟件協議)、y
後續就會自動尋找需要加https的域名,也可以手動輸入

centos7 server下

1、直接安裝相關包
yum install certbot python2-certbot-nginx
2、首次運行時配置certbot
certbot --nginx

按照提示輸入郵箱、a(同意軟件協議)、y
後續就會自動尋找需要加https的域名,也可以手動輸入

發佈了264 篇原創文章 · 獲贊 202 · 訪問量 110萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章