免费证书https://lamp.sh/ssl.html

https(全称:Hyper Text Transfer Protocol over Secure Socket Layer),是以安全为目标的 http 通道,简单讲是 http 的安全版。即 http 下加入 SSL 层,https 的安全基础是 SSL,因此加密的详细内容就需要 SSL。
LAMP 新增对 Let’s Encrypt 的支持,自动签发免费的证书,并添加自动任务到 crond,定期运行自动更新证书。
安装完 LAMP 后,lamp 命令就可以使用了,用法如下。
Usage: lamp [ add | del | list ]
add Create new Apache Virtual Host
del Delete Apache Virtual Host
list List all of Apache Virtual Host
下面为使用 lamp 命令增加 SSL 证书支持的详细使用教程。
新增虚拟主机
注意:在新增虚拟主机之前,请务必确保域名已经解析到该服务器(VPS)的 IP 上,否则 Let’s Encrypt 验证无法通过。
使用命令:
lamp add
交互显示如下:
Please enter server names(example: www.lamp.sh lamp.sh): 此处输入网站域名
Please enter website root directory(default:/data/www/网站域名): 此处输入网站根目录路径,默认回车即可
Please enter Administrator Email address: 此处输入管理员邮箱地址
Administrator Email address: 此处显示上一步输入的邮箱地址
Do you want to create a database and mysql user with same name? [y/n]: 此处输入 y 或 n,表示创建或不创建数据库(输入 y)
Virtual host [网站域名] has been created
Website root directory is: /data/www/网站域名
Database [数据库名] and mysql user [数据库用户名] has been created // 数据库及同名用户创建成功
Reloading the apache config file...
Syntax OK
Reload success
Do you want to add a SSL certificate? [y/n]: 此处输入 y 或 n,表示添加或不添加证书(输入 y)
1: Use your own SSL Certificate and Key
2: Use Let's Encrypt to create SSL Certificate and Key
Please enter 1 or 2: 此处输入 1 或 2,表示使用自己的证书,或使用 Let's Encrypt 签发免费证书(输入 2)
You have already chosen Let's Encrypt
It will be processed automatically
Installing certbot command...
此处开始下载安装 certbot 命令
Starting create Let's Encrypt SSL Certificate...
此处开始安装 certbot 运行所需的依赖库等
Creating virtual environment...
Installing Python packages...
Installation succeeded.
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator webroot, Installer None
Obtaining a new certificate
Performing the following challenges:
http-01 challenge for 网站域名
Using the webroot path /data/www/网站域名 for all unmatched domains.
Waiting for verification...
Cleaning up challenges
IMPORTANT NOTES:
- Congratulations! Your certificate and chain have been saved at:
/etc/letsencrypt/live/网站域名/fullchain.pem
Your key file has been saved at:
/etc/letsencrypt/live/网站域名/privkey.pem
Your cert will expire on 2018-02-02. To obtain a new or tweaked
version of this certificate in the future, simply run certbot
again. To non-interactively renew *all* of your certificates, run
"certbot renew"
- Your account credentials have been saved in your Certbot
configuration directory at /etc/letsencrypt. You should make a
secure backup of this folder now. This configuration directory will
also contain certificates and private keys obtained by Certbot so
making regular backups of this folder is ideal.
- If you like Certbot, please consider supporting our work by: Donating to ISRG / Let's Encrypt: https://letsencrypt.org/donate
Donating to EFF: https://eff.org/donate-le Let's encrypt crontab renew rule is not exist, create it!
Create Let's Encrypt SSL Certificate successfully
Reloading the apache config file...
Syntax OK
Reload success
All done
结束后,查看 crond 任务,命令如下:
crontab -l
确认返回值里包含以下语句:
0 3 */7 * * /bin/certbot renew --disable-hook-validation --renew-hook "/etc/init.d/httpd restart"
Let’s Encrypt 签发的证书和私钥路径:
/etc/letsencrypt/live/网站域名/fullchain.pem
/etc/letsencrypt/live/网站域名/privkey.pem
创建完虚拟主机后,网站的根目录为:
/data/www/网站域名
日志文件的目录为:
/data/wwwlog/网站域名
最后,别忘了将你的程序放到网站根目录下,即可使用。
祝使用愉快!
免费证书https://lamp.sh/ssl.html的更多相关文章
- 基于Let's Encrypt生成免费证书-支持多域名泛域名证书
目录 客户端 certbot acme.sh 安装acme.sh 1. 自动安装 2. 手动安装 3. 测试收否安装成功 使用acme.sh生成证书 1. HTTP 方式 2. DNS 方式 1. 生 ...
- http免费升级https 攻略(超简单)
1.注册沃通SSL免费证书 https://buy.wosign.com/FreeSSL.html 2.验证邮件域名,并下载证书 3.打开IIS,找到服务器证书选择导入,选择下载下来的证书 4.设置网 ...
- Letsencrypt.org CA免费证书生成
Letsencrypt.org CA免费证书使用 Let's 支持多中客户端,这里使用acme.sh客户端配置免费证书. acme.sh优点: github官方地址 纯用Shell(Unix外壳)语言 ...
- Linux下使用acme.sh 配置https 免费证书
acme.sh 简单来说acme.sh 实现了 acme 协议, 可以从 let‘s encrypt 生成免费的证书.acme.sh 有以下特点:一个纯粹用Shell(Unix shell)语言编写的 ...
- 微信小程序免费SSL证书https、TLS版本问题的解决方案
微信小程序与第三方服务器通讯的域名5个必要条件1.一个已备案的域名,不是localhost.也不是127.0.0.1,域名不能加端口2.加ssl证书,也就是https://~~~4.HTTPS 服务器 ...
- 八大免费SSL证书-给你的网站免费添加Https安全加密
评论» https://www.freehao123.com/top-8-free-ssl-cert/ 文章目录 Let's Encrypt StartSSL SSL CloudFlare SSL ...
- 免费获取SSL证书/一键安装SSL证书/https加密
因为我用的是恒创的香港服务器 虽然价格相较于大促的阿里云贵一些,但是有一个有点不用备案... 安装步骤: 1.登录云主机控制面板, 在 其他管理 中找到并进入 SSL证书 设置. 注意:如拥有多个域名 ...
- nginx使用ssl模块配置支持HTTPS访问,腾讯云申请免费证书
开始我尝试用 let's encrypt 让http 变 https 官方:https://github.com/certbot/certbot 参考:https://www.cnblogs.com/ ...
- HTTPS(SSL / TLS)免费证书申请及网站证书部署实战总结
服务器环境:windows server 2008 + tomcat7 废话不多说,先看部署效果: 一.免费证书申请 Let's Encrypt 简介:let's Encrypt 是一个免费的开 ...
随机推荐
- WebRequest + Https + 憑証錯誤 = 作業逾時
前言 一般的系統一登入時,都會顯示公告訊息,我們的系統也是! 因為系統效能問題,所以就幫忙看了程式.發現,每次登入時,都會到DB取公告資料,但公告並不會因為個人而有所不同,是針對整個系統的呀! 所以就 ...
- Python读写文件基础.py
基本函数 定义 python内置了open()函数来操作文件,open()函数的定义为: open(file, mode='r', buffering=-1, encoding=None, error ...
- Hibernate 再接触 关系映射 一对一双向外键关联
凡是双向关联必设mapped by 由对方主导 wifi.java package com.bjsxt.hibernate; import javax.persistence.Entity; imp ...
- ArcGIS案例学习笔记3_1_地理配准案例_图面控制点
ArcGIS案例学习笔记3_1_地理配准案例_图面控制点 计划时间:第3天上午 目的:地形图控制点配准 数据:地形图drg 无坐标: 步骤 1.查看地图标注 2. 地理配准,添加控制点 3.结果: 联 ...
- shell-保留文件系统下剩余指定数目的文件
path_backup=/mnt/fifth/backup/shellbackup path_delete=/mnt/fifth/tmp/rubbish/ limit_num=15 f ...
- DBCC维护语句语法
一.DBCC维护语句:对数据库.索引或文件组进行维护的任务--1.DBCC CLEANTABLE,回收删除的可变长度列和文本列的空间 DBCC CLEANTABLE ( { 'database_na ...
- Halcon常用算子01
F1:Help F2:重置 F3:激活一行程序 F4:注销一行程序 F5:执行到stop()或程序结尾 F6:步执行(一步步调试) F10:添加或撤销断点 dev_open_window:打开图像窗口 ...
- linux 内核移植
1. 下载内核源码linux-2.6.34,解压到工作目录下. 2. 首先在内核中增加一个 SOC ,到 /arch/arm/mach-s3c64xx 下将mach-smdk6410.c 复制成 ma ...
- php正则替换双引号里面的字符
- day18 logging模块 sys shelve
昨日回顾 re 正则表达式 匹配字符串 场景 例如:爬虫,密码规则验证,邮箱地址验证,手机号码 学习re主要学习的就是 那一堆特殊符号 hashlib hash是一种算法 lib表示库 该模块包含了一 ...