分享web开发知识

注册/登录|最近发布|今日推荐

主页 IT知识网页技术软件开发前端开发代码编程运营维护技术分享教程案例
当前位置:首页 > 软件开发

oneinstack 安装 https-certbot

发布时间:2023-09-06 02:09责任编辑:赖小花关键词:http

免费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.logError 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:15nginx: configuration file /etc/nginx/nginx.conf test failedCould 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请求方式了。

oneinstack 安装 https-certbot

原文地址:https://www.cnblogs.com/q1104460935/p/9459139.html

知识推荐

我的编程学习网——分享web前端后端开发技术知识。 垃圾信息处理邮箱 tousu563@163.com 网站地图
icp备案号 闽ICP备2023006418号-8 不良信息举报平台 互联网安全管理备案 Copyright 2023 www.wodecom.cn All Rights Reserved