sh letsencrypt证书生成器与docker

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了sh letsencrypt证书生成器与docker相关的知识,希望对你有一定的参考价值。

#!/bin/bash
#
# 1. create a EC2 instance with public IP
# 2. create a A RR in route53 pointing your.domain.com to the public IP
# 3. make sure HTTP/HTTPS ports(80 443) are public to all in security group of this EC2 instance
# 4. make sure docker daemon is running in this EC2 instance
# 5. run this script !
# 6. keys/cert will be generated under /root/letsencrypt/etc/live/

mkdir -p /root/letsencrypt/log /root/letsencrypt/lib /root/letsencrypt/etc
email='your_email@gmail.com'
domain='your.domain.com'

docker run --rm -it -p 80:80 -p 443:443 -v "/root/letsencrypt/log:/var/log/letsencrypt" -v "/var/www/:/var/www/" -v "/root/letsencrypt/etc:/etc/letsencrypt" -v "/root/letsencrypt/lib:/var/lib/letsencrypt" lojzik/letsencrypt certonly --email $email -d $domain --standalone

以上是关于sh letsencrypt证书生成器与docker的主要内容,如果未能解决你的问题,请参考以下文章

https免费泛域名证书申请

用 letsencrypt 生成 SSL 证书

为微信小程序开发做准备,在Centos 6.8下利用letsencrypt.sh脚本为nginx 配置免费https证书

给网站配置免费的HTTS证书

利用letsencrypte生成证书时,create virtual environment失败

[web建站]-简单通过letsencrypt配置HTTPS证书