eATM

使用acme.sh自动申请/续期ssl证书

#安装
curl  https://get.acme.sh | sh

#可能需要使用一个邮箱来注册
acme.sh --register-account -m xxxxxxxxxx@gmail.com


#--webroot使用网站根目录方式验证
# -d 指定域名
#并指定key与cer文件路径
#--reloadcmd 指行nginx重启命令
acme.sh --issue --force -d eatm.app -d www.eatm.app \
 --webroot /www/wwwroot/eatm.app/ \
 --key-file /etc/letsencrypt/live/eatm.app/privkey.pem \
 --fullchain-file /etc/letsencrypt/live/eatm.app/fullchain.pem \
 --reloadcmd     "service nginx restart"

#不出意外就完全OK了,今后也能够自动更新

#-----------------------------------------------------------------------其它命令

#使用网站根目录方式验证
~/.acme.sh/acme.sh --issue -d eatm.app -d www.eatm.app --webroot /www/wwwroot/eatm.app/


#--------或者.使用nginx方式验证
~/.acme.sh/acme.sh --issue  -d eatm.app -d www.eatm.app  --nginx

#--------如果提示找不到nginx配置文件,在使用面板的nginx会出现这种情况,则需要指定nginx的配置文件
~/.acme.sh/acme.sh --issue  -d eatm.app -d www.eatm.app  --nginx /www/server/panel/vhost/nginx/eatm.app.conf




#完成后会出现cer与key的文件路径

 

发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注