免费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. 自然底数e的意义是什么?

    自然底数e的意义是什么? https://mp.weixin.qq.com/s?__biz=MzA5ODUxOTA5Mg==&mid=2652553811&idx=1&sn=0 ...

  2. JMeter 接口测试(一)

    之前的篇幅介绍了soapUI测试接口, 因为功能丰富, 操作简单, 可以参数化而深受测试小伙伴的喜欢, 今天再给大家介绍一款利器, Jmeter是Apache组织下的免费工具, 我使用的是Mac 系统 ...

  3. MySQL自增列(AUTO_INCREMENT)相关知识点总结

      MySQL的自增列(AUTO_INCREMENT)和其它数据库的自增列对比,有很多特性和不同点(甚至不同存储引擎.不同版本也有一些不同的特性),让人感觉有点稍微复杂.下面我们从一些测试开始,来认识 ...

  4. docker compose 服务启动顺序控制

    概要 docker-compose 可以方便组合多个 docker 容器服务, 但是, 当容器服务之间存在依赖关系时, docker-compose 并不能保证服务的启动顺序. docker-comp ...

  5. idea spring-boot总结

    1. 按自己重新配置spring-boot pom点进 mybatis-spring-boot-starter ,在要改的里面 <version>3.4.4</version> ...

  6. Zabbix 3.4.7调整监控阈值以及告警级别

    1.找到需要监控的主机:右上角进行搜索 我们要更改sepm02p的阈值和级别: 进行更改级别:先点击Triggers , 选中要更改的监控项,例如我要更改CPU,点击以下红色标出的,千万不要选择Tem ...

  7. Linux之指令 重定向 文件覆盖>和文件追加>>

    指令>和>>区别 指令 > : 如果文件存在,将原来文件的内容覆盖:原文件不存在则创建文件,再添加信息. 指令 >>:不会覆盖原文件内容,将内容追加到文件的尾部. ...

  8. 【转】Android 增,删,改,查 通讯录中的联系人

    一.权限 操作通讯录必须在AndroidManifest.xml中先添加2个权限, <uses-permission android:name="android.permission. ...

  9. .NET平台下,初步认识AutoMapper

    初步认识AutoMapper AutoMapper 初步认识AutoMapper 前言 手动映射 使用AutoMapper 创建映射 Conventions 映射到一个已存在的实例对象   前言 通常 ...

  10. codeforces#1011C. Fly (二分,注意精度)

    题意:火箭经过1到n号星球,并回到1号星球,现在给出每消耗一砘燃油能带起的火箭质量a[i]和b[i],a[i]代表在第i个星球起飞,b[i]代表在第i个星球降落.求出最少消耗的汽油.保证:如果不能完成 ...