centos 6.5 先安装企业扩展
yum install epel-release
现在免费证书生成工具
git clone https://github.com/letsencrypt/letsencrypt
cd letsencrypt
./letsencrypt-auto certonly
根据提示填写(区分域 http://www.clsos.org与clsos.org是不同的)
最后生成地址 例如
/etc/letsencrypt/live/clsos.org/fullchain.pem
nginx 配置文件中添加
server{
listen 443;
ssl on;
ssl_certificate /etc/letsencrypt/live/clsos.org/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/clsos.org/privkey.pem;
其它配置省略
}