1、下載安裝腳本
wget dl.eff.org/certbot-auto
2、添加執行權限
chmod a+x certbot-auto
3、自動下載和安裝環境需要的組件
./certbot-auto --apache certonly
4、生成密鑰文件
./certbot-auto certonly --webroot --webroot-path 網站根目錄的絕對路徑 --agree-tos --email email -d domain
示例
./certbot-auto certonly --webroot --webroot-path /data/web/cnsunrun --agree-tos --email [email protected] -d www.cnsunrun.com
5、修改apache配置
NameVirtualHost *:80
<VirtualHost *:443>
DocumentRoot "網站根目錄"
ServerName 域名:443
SSLEngine on
SSLCertificateFile /etc/letsencrypt/live/域名/cert.pem
SSLCertificateChainFile /etc/letsencrypt/live/域名/chain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/域名/privkey.pem
</VirtualHost>
6、重啓apache服務器
ATS檢測地址
myssl.com/ats.html?domain=api.china-data.com.cn&port=443
https安裝與配置 (apache)版
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.