Letsencrypt SSL免费证书申请(Docker)
最近需要SSL证书,又不想花钱买,正好看到linux基金会去年底上线了新的开源项目,免费推广SSL遂尝试。
Let's Encrypt 介绍
Let’s Encrypt is a free, automated, and open certificate authority (CA), run for the public’s benefit. It is a service provided by the Internet Security Research Group (ISRG).
We give people the digital certificates they need in order to enable HTTPS (SSL/TLS) for websites, for free, in the most user-friendly way we can. We do this because we want to create a more secure and privacy-respecting Web.
The key principles behind Let’s Encrypt are:
Free: Anyone who owns a domain name can use Let’s Encrypt to obtain a trusted certificate at zero cost.
Automatic: Software running on a web server can interact with Let’s Encrypt to painlessly obtain a certificate, securely configure it for use, and automatically take care of renewal.
Secure: Let’s Encrypt will serve as a platform for advancing TLS security best practices, both on the CA side and by helping site operators properly secure their servers.
Transparent: All certificates issued or revoked will be publicly recorded and available for anyone to inspect.
Open: The automatic issuance and renewal protocol will be published as an open standard that others can adopt.
Cooperative: Much like the underlying Internet protocols themselves, Let’s Encrypt is a joint effort to benefit the community, beyond the control of any one organization.
We have a page with more detailed information about how the Let’s Encrypt CA works.
以下内容来源于dockhub上的xataz/letsencrypt,有修改
1.编辑Dockerfile如下(部分内容来源于网络:xazta)
FROM alpine:3.5
ENV CERTBOT_VER v0.11.1
LABEL description="Letsencrypt based on alpine" \
tags="latest 0.11.1 0.1" \
maintainer="shawn.qian" \
build_ver="2017022401"
RUN BUILD_DEPS="py2-pip \
gcc \
musl-dev \
python2-dev \
libffi-dev \
openssl-dev" \
&& apk add -U ${BUILD_DEPS} \
tini \
dialog \
python \
libssl1.0 \
&& pip install --no-cache virtualenv \
&& virtualenv --no-site-packages -p python2 /usr/certbot/venv \
&& /usr/certbot/venv/bin/pip install --no-cache-dir certbot==$CERTBOT_VER \
&& pip uninstall --no-cache-dir -y virtualenv \
&& apk del ${BUILD_DEPS} \
&& rm -rf /var/cache/apk/* /root/.cache/pip
EXPOSE 80 443
VOLUME /etc/letsencrypt/
ENTRYPOINT ["/sbin/tini","--","/usr/certbot/venv/bin/certbot"]
CMD ["--help"]
保存文件,运行
docker build -t yourreposname/letsencrypt
安静等待build完成
2. 执行
sudo docker run -it --rm \
-v /etc/letsencrypt:/etc/letsencrypt \
-p 443:443 yourreposname/letsencrypt certonly \
--standalone \
--agree-tos
\-m yourmailadd@mail.com
\-d your.domain.com
P.S
1.本案例使用443端口,请保持你的443端口畅通,成功后会在/etc/letsencrypt下生成live/your.domain.com文件夹,里面就是你的证书文件了。
2. yourreposname/letsencrypt 其中"yourreposname"改成你的仓库名
cert.pem 申请的服务器证书文件
privkey.pem 服务器证书对应的私钥
chain.pem 除服务器证书外,浏览器解析所需的其他全部证书,比如根证书和中间证书
fullchain.pem 包含服务器证书的全部证书链文件
Letsencrypt SSL免费证书申请(Docker)的更多相关文章
- SSL免费证书申请以及nginx配置https流程记录
设置https需要ssl 证书,可以通过FreeSSL[https://freessl.org/]申请. 流程记录: 输入域名,如 http://www.youdias.xin 选择品牌,如Let's ...
- HTTPS(SSL / TLS)免费证书申请及网站证书部署实战总结
服务器环境:windows server 2008 + tomcat7 废话不多说,先看部署效果: 一.免费证书申请 Let's Encrypt 简介:let's Encrypt 是一个免费的开 ...
- 转自《https安全链接的配置教程:startSSl免费证书申请与nginx的https支持配置》
一.什么是 SSL 证书,什么是 HTTPS 网站? SSL证书是数字证书的一种,类似于驾驶证.护照和营业执照的电子副本.SSL证书通过在客户端浏览器和Web服务器之间建立一条SSL安全通道(Secu ...
- Nginx启用ssl以及免费证书申请
主要是这个东西,折腾了我两天,所以记录下来. 最开始是在meteor下面调用一个webservice,但是发现meteor项目的发布环境时https,所以请求的webservice也必须时webser ...
- 免费证书申请——Let's Encrypt的申请与应用(IIS,Tomcat)
环境 Windows Server 2008 R2 Tomcat 8.5.31 JDK8 利用IIS+letsencrypt-win-simple.V1.9.1申请免费SSL证书 新建一个IIS空网站 ...
- iOS https认证 && SSL/TLS证书申请
1.下面列出截止2016年底市面上常见的免费CA证书: 腾讯云SSL证书管理(赛门铁克TrustAsia DV SSL证书)阿里云云盾证书服务(赛门铁克DV SSL证书)百度云SSL证书服务Let's ...
- Java Web学习总结(31)——全站HTTPS化SSL免费证书使用
1 背景 谷歌从 2017 年起,Chrome 浏览器将也会把采用 HTTP 协议的网站标记为「不安全」网站:苹果从 2017 年 iOS App 将强制使用 HTTPS:在国内热火朝天的小程序也要求 ...
- 阿里云使用ssl免费证书
购买免费证书 购买之后 申请证书 该域名必须添加一条TXT记录 根据提示添加记录 下载证书 我用的nginx做的映射,所以下载nginx nginx安装自行百度 将下载的文件解压到nginx目录下(创 ...
- StartSSL免费证书申请笔记
第一步:申请startssl账号 填写相应信息后,你所填写的邮箱会收到邮件 里面有一个用来验证的验证码 输入得到的.... 注册成功后会安装数字证书(注意:注册过程中没有叫输入账号密码,这也是通过证认 ...
随机推荐
- 加密、签名和SSL握手机制细节
openssl系列文章:http://www.cnblogs.com/f-ck-need-u/p/7048359.html 1.1 背景知识 对称加密 :加密解密使用同一密钥,加解密速度快.随 ...
- 第一个博客——python通过值传递函数参数
功能:银行账户计算利率(python实现) 部分代码: def addInterest(balance, rate): newBalance = balance * (1 + rate) balanc ...
- 搜狗浏览器或者360浏览器安装chrome 浏览器插件
https://www.cnblogs.com/ingvar/p/6403777.html#undefined
- JS 中的广度与深度优先遍历
现在有一种类似树的数据结构,但是不存在共同的根节点 root,每一个节点的结构为 {key: 'one', value: '1', children: [...]},都包含 key 和 value,如 ...
- day060 ajax文件上传 json补充
请求头ContentType 文件上传时需要指定请求头,常见的类型有3种: 1.application/x-www-form-urlencoded(可以类比成在url后面拼接的形式发送,即a=1&am ...
- overload(重载)和override(覆盖)的注意点
使用overload(重载)的几个注意点: 在使用重载时只能通过不同的参数形式.例如:不同的参数类型,不同的参数个数,不同的参数顺序,当然,同一个方法内的几个参数类型必须不一样.例如可以是fun(in ...
- scrapy框架初级
scrapy入门教程:https://scrapy-chs.readthedocs.io/zh_CN/0.24/intro/tutorial.html 一.安装 python模块网站,应用文件放置在s ...
- vue-cli 安装过程出现错误
如果是这样得错误,那是你在安装sass得问题,需要安装python2,安装好就行了
- nginx——优化 Nginx 站点目录
1. 禁止解析指定目录下的指定程序 location ~ ^/data/.*.(php|php5|sh|pl|py)$ { # 根据实际来禁止哪些目录下的程序,且该配置必须写在 Nginx 解析 PH ...
- REST easy with kbmMW #24 使用kbmMW实现JSON/XML/YAML转换成对象
你想过没有,把一个给定的xml或json生成一个Delphi类,并通过这个类完成对xml或json的读写操作吗? 不管有没有,现在kbmMW为我们实现了,看下面这行代码: var s:string; ...