惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Vercel News
Vercel News
博客园 - 司徒正美
大猫的无限游戏
大猫的无限游戏
Last Week in AI
Last Week in AI
V
Visual Studio Blog
阮一峰的网络日志
阮一峰的网络日志
小众软件
小众软件
宝玉的分享
宝玉的分享
Apple Machine Learning Research
Apple Machine Learning Research
美团技术团队
WordPress大学
WordPress大学
博客园 - 聂微东
人人都是产品经理
人人都是产品经理
罗磊的独立博客
The Cloudflare Blog
V
V2EX
月光博客
月光博客
有赞技术团队
有赞技术团队
Y
Y Combinator Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
GbyAI
GbyAI
博客园 - 【当耐特】
T
Tailwind CSS Blog

zodream梦想开源/个人编程日记

文件解析笔记-zodream梦想开源/个人编程日记 密码本开发笔记之读写与保存-zodream梦想开源/个人编程日记 SkiaSharp 把 pixel byte[] 转成 SKBitmap-zodream梦想开源/个人编程日记 nas 使用 Docker 安装 gogs-zodream梦想开源/个人编程日记 复制 android 手机中的文件到电脑-zodream梦想开源/个人编程日记 周报:寻找优质的周刊-zodream梦想开源/个人编程日记 开发日志:对Markdown的代码块新增引用来源支持-zodream梦想开源/个人编程日记 周报:怎么写技术类的教程文章-zodream梦想开源/个人编程日记 css display:flex 布局尺寸超出问题-zodream梦想开源/个人编程日记 周报:SEO优化的思考-zodream梦想开源/个人编程日记 Edge 浏览器不适用 Edge Image Viewer 打开图片 -zodream梦想开源/个人编程日记 SEO 学习笔记(一) 内容来源-zodream梦想开源/个人编程日记 PHP 实现双因素身份认证(2FA)-zodream梦想开源/个人编程日记 WPF MVVM 获取List 多选数据-zodream梦想开源/个人编程日记 Burp Suite 抓包-zodream梦想开源/个人编程日记 使用 indexnow 注意事项-zodream梦想开源/个人编程日记 Godot 使用字体图标 例如: Iconfont、FontAwesome-zodream梦想开源/个人编程日记 angular 15 对指定页面进行访问限制-zodream梦想开源/个人编程日记 CSS 使用 column-count 实现瀑布流出现内容分割的解决办法-zodream梦想开源/个人编程日记 input 确认按键事件在手机端不生效-zodream梦想开源/个人编程日记 C# 使用socket 进行通讯-zodream梦想开源/个人编程日记 Maui开发中Windows应用开启管理员权限-zodream梦想开源/个人编程日记 Maui 中自定义控件-zodream梦想开源/个人编程日记 angular 14 使用 ng-template 实现tree 结构显示-zodream梦想开源/个人编程日记 c# 动态安装和卸载dll-zodream梦想开源/个人编程日记 慎用 CompositionTarget.Rendering-zodream梦想开源/个人编程日记 c# 重写 c++ 程序笔记:数据初始化-zodream梦想开源/个人编程日记 源码编译 aseprite-zodream梦想开源/个人编程日记 记录一下字符串分隔split各语言之间的不同-zodream梦想开源/个人编程日记 c# Gzip解码无头内容-zodream梦想开源/个人编程日记
centos7 xampp 配置Let's Encrypt 证书-zodream梦想开源/个人...
zodream · 2017-10-28 · via zodream梦想开源/个人编程日记

centos7 xampp 配置Let's Encrypt 证书

本次使用的是 Let's Encrypt 推荐的快速安装工具 Certbot

尝试

一开始使用文档中的安装方法

yum install certbot-apache

12

但是发现报错,原来是程序不是最新的

然后根据 certbot: ImportError: ‘pyOpenSSL’ module missing required functionality, 使用pip 安装

清除之前操作

yum remove certbot pyOpenSSL

12

准备

安装epel扩展源, 安装pip并更新到最新

yum -y install epel-release

yum -y install python-pip

pip install --upgrade pip

12345

安装

安装最新版

pip install pyOpenSSL

pip install certbot

123

申请ssl 绑定路径

certbot certonly --webroot -w /data/www/html -d zodream.cn

1

如果有多个域名

那么只要在加上 -d 域名即可,即使是临时增加一个域名,也要把所有域名都加上才行,

certbot certonly --webroot -w /data/www/html -d zodream.cn -d test.zodream.cn

1

如果不同域名在不同文件夹,只需要设一个 -w 作为验证权限即可

更改 apache 站点配置,重启xampp

 <VirtualHost *:443>  
    ServerName zodream.cn
    DocumentRoot "/data/www/html"
    ServerAdmin webmaster@zodream.cn
    ServerName zodream.cn
    ServerAlias www.zodream.cn
    SSLEngine on
    SSLCertificateFile /etc/letsencrypt/live/zodream.cn/fullchain.pem
    SSLCertificateKeyFile /etc/letsencrypt/live/zodream.cn/privkey.pem
    ErrorLog "logs/dummy-www.zodream.cn-error_log"
    CustomLog "logs/dummy-www.zodream.cn-access_log" common
 </VirtualHost>

<Directory "/data/www/html">  
    DirectoryIndex index.php index.html index.htm 
    Options FollowSymLinks Includes ExecCGI  
    AllowOverride All  
    Order allow,deny  
    Allow from all  
</Directory>

1234567891011121314151617181920

使用

certbot renew --dry-run

1

安装自动更新证书

也可以手动更新证书

参考:

  1. certbot.eff.org

  2. certbot-importerror-pyopenssl-module-missing-required-functionality

转载请保留原文链接: https://zodream.cn/blog/id/12.html