oneinstack 安装 https-certbot

Posted q1104460935

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了oneinstack 安装 https-certbot相关的知识,希望对你有一定的参考价值。

技术分享图片

 

免费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.
      
      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
      ‘,)
      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.
      
      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
      ‘,)
      

        解决方案:执行:

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

       

    2. 技术分享图片
      选择 7; 需要添加HTTPS的域名

    3. 技术分享图片
      选择2;全部使用HTTPS

    4. 技术分享图片



  3. 完成;此时访问域名,便是https请求方式了。

 

以上是关于oneinstack 安装 https-certbot的主要内容,如果未能解决你的问题,请参考以下文章

Linux一键安装PHP/JAVA环境OneinStack

OneinStack PHP多版本共存教程

OneinStack 安装 LNMP 切换PHP版本

OneinStack一键PHP/JAVA安装工具

用oneinstack安装的mysql忘记密码后怎么办?

oneinstack安装lnmp之后还需要 对nginx与php集成吗