https安装与配置 (apache)版

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

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章