免费https?   官方安装教程:https://certbot.eff.org/#centos6-nginx (以下是说明安装时遇到的);

  1. 下载并修改文件权限

    wget https://dl.eff.org/certbot-auto && chmod a+x certbot-auto
    

      

  2. 执行:
    1. ./certbot-auto --nginx certonly   或是 ./certbot-auto --nginx
      报错:xx包........出错;请 yum update 更新一下;
      报错:一般情况oneinstack 把nginx 没有安装在 /etc 目录:

      WARNING: unable to check for updates.
      Saving debug log to /var/log/letsencrypt/letsencrypt.log
      Error while running nginx -c /etc/nginx/nginx.conf -t. nginx: [emerg] open() "/etc/nginx/mime.types" failed (2: No such file or directory) in /etc/nginx/nginx.conf:15
      nginx: configuration file /etc/nginx/nginx.conf test failed Could not choose appropriate plugin: The nginx plugin is not working; there may be problems with your existing configuration.
      The error was: MisconfigurationError('Error while running nginx -c /etc/nginx/nginx.conf -t.\n\nnginx: [emerg] open() "/etc/nginx/mime.types" failed (2: No such file or directory) in /etc/nginx/nginx.conf:15\nnginx: configuration file /etc/nginx/nginx.conf test failed\n',)
      The nginx plugin is not working; there may be problems with your existing configuration.
      The error was: MisconfigurationError('Error while running nginx -c /etc/nginx/nginx.conf -t.\n\nnginx: [emerg] open() "/etc/nginx/mime.types" failed (2: No such file or directory) in /etc/nginx/nginx.conf:15\nnginx: configuration file /etc/nginx/nginx.conf test failed\n',)

        解决方案:执行:

      /certbot-auto --nginx --nginx-server-root=/usr/local/nginx/conf
      

    2. 选择 7; 需要添加HTTPS的域名


    3. 选择2;全部使用HTTPS

  3. 完成;此时访问域名,便是https请求方式了。
  4. 默认免费证书时间是有限的。需要更新达到续签; (/root/certbot-auto 为本人 certbot 安装目录)
    1. 手动续签

      /root/certbot-auto renew
      

        

    2. 自动续签
      执行:
      crontab -e
      

        写入:每天零点到十二点更新一次;

      0 0,12 * * * python -c 'import random; import time; time.sleep(random.random() * 3600)' && /root/certbot-auto renew
      

        也可以:30 2 * */2 * certbot renew –pre-hook “service nginx stop” –post-hook “service nginx start”     ——  每隔两个月凌晨2:30更新:

    3. 续签完成:并显示过期时间  crontab -l 可查看任务详情;
  5. -结束

oneinstack 安装 https-certbot的更多相关文章

  1. C#检测并安装https站点的数字证书,CefSharp和HttpWebRequest通过会话Cookie实现自动登录访问https站点

    HttpUtil工具类: using System; using System.Collections.Generic; using System.IO; using System.Linq; usi ...

  2. OneinStack 安装 LNMP 切换PHP版本

    如果你的环境不是OneinStack安装的  ,可以略过这条博客了 注意:以下所有命令若提示权限不足 请在命令前加 sudo *** ①,首先查看当前已安装的PHP版本,我这里安装了好几个版本,你们可 ...

  3. 小米手机安装https证书报错:无法安装该证书 因为无法读取该证书文件

    Fiddler]手机安装https证书报错:无法安装该证书 因为无法读取该证书文件   之前在手机上使用 “ip:端口号” 的方法就能直接在手机上自动下载安装fiddler证书,但是现在有些手机并不能 ...

  4. Charles安装https证书

    Charles抓取https的包,出现unknow,需要安装https证书.

  5. Let's Encrypt: 为CentOS/RHEL 7下的nginx安装https支持-具体案例

    环境说明: centos 7 nginx 1.10.2 前期准备 软件安装 yum install -y epel-release yum install -y certbot 创建目录及链接 方法1 ...

  6. 阿里云中ssl配置(nginx安装https服务)

    1.配置 a.阿里云服务器 b.安装了nginx,php等 2.申请免费ssl证数 a. b. c.产看ssl证数 d.下载证数 e,这里我下载的是nginx(crt与key文件) f.服务器上配置 ...

  7. OneinStack 安装

    安装步骤 注意 如果有单独数据盘,建议您先挂载数据盘,建议将网站内容.数据库放在数据盘中.如何挂载数据盘,请参考(支持阿里云.腾讯云):<如何利用脚本自动化挂载数据盘?> yum -y i ...

  8. linux apache安装https证书

    1.首先查看是否安装apache 命令:rpm -qa|grep httpd 如果存在,卸载命令:rpm -e XXXX 如果不存在,安装命令:yum install httpd 安装完apache之 ...

  9. 插件油泼猴+脚本 for chrome 安装 - https://greasyfork.org/zh-CN

    http://chromecj.com/utilities/2018-09/1525.html 一.将 *.crx 改名为 *.zip 二.访问 chrome://flags/#extensions- ...

随机推荐

  1. 39.Odoo产品分析 (四) – 工具板块(8) – 生产力(1)

    查看Odoo产品分析系列--目录 生产力相当于一个即时贴或便签.用便签或待办事项处理个人的任务.  安装生产力模块,得到"便签"主菜单:  创建一个便签,该表单对应note.not ...

  2. python 类继承演示范例的代码

    把做工程过程重要的代码片段备份一次,下面的资料是关于python 类继承演示范例的代码. # a simple example of a class inheritance # tested with ...

  3. 对国内IoT的展望

    这个世界上让任何人最安心的,莫过于自己能够完全控制,反之什么都无法控制的,万念俱灰之下,最后只有自我了结.芸芸众生都是在这个之间徘徊,尽可能的去掌控,尽可能的去拥有,觉得能够安心,其实只是自由的内心被 ...

  4. MySQL InnoDB 日志管理机制中的MTR和日志刷盘

    1.MTR(mini-transaction) 在MySQL的 InnoDB日志管理机制中,有一个很重要的概念就是MTR.MTR是InnoDB存储擎中一个很重要的用来保证物理写的完整性和持久性的机制. ...

  5. Redis(十一):Redis的事务功能详解

    相关命令 1. MULTI 用于标记事务块的开始.Redis会将后续的命令逐个放入队列中,然后才能使用EXEC命令原子化地执行这个命令序列. 这个命令的运行格式如下所示: MULTI 这个命令的返回值 ...

  6. Android Studio教程08-与其他app通信

    目录 1.向另外一个应用发送用户 1.1. 构建隐含Intent 1.2. 验证是否存在接收Intent的应用 1.3. 启动具有Intent的Activity 2. 获取Activity的结果响应 ...

  7. DB2 因版本问题 Reorg 出错 解决办法

    call Sysproc.admin_cmd('REORG TABLE MY_TABLE_NAME');

  8. 【English】20190315

    accelerate 加速 [ækˈsɛləˌret]  Our goal is to help you be more successful in your role and work togeth ...

  9. kernel笔记——进程调度

    调度器完成以下任务: 时钟中断(或类似的定时器)时间内刷新进程的时间片,设置进程调度标志 系统调用返回或中断完成时检查调度标志 schedule函数 内核代码中完成进程调度的函数为schedule() ...

  10. Spring Cloud:统一异常处理

    在启动应用时会发现在控制台打印的日志中出现了两个路径为 {[/error]} 的访问地址,当系统中发送异常错误时,Spring Boot 会根据请求方式分别跳转到以 JSON 格式或以界面显示的 /e ...