1、下载脚本

1
2
3
wget https://raw.githubusercontent.com/xdtianyu/scripts/master/lets-encrypt/letsencrypt.conf
wget https://raw.githubusercontent.com/xdtianyu/scripts/master/lets-encrypt/letsencrypt.sh
chmod +x letsencrypt.sh

2、修改letsencrypt.conf

1
2
3
# 修改 DOMAIN_KEY
# 修改 DOMAIN_DIR
# 修改 DOMAINS

3、申请证书

1
./letsencrypt.sh letsencrypt.conf

4、修改nginx配置