• certbot申请SSL证书及中间证书问题


        首先是到https://certbot.eff.org/上申请证书,由于我们使用的web服务器是基于erlang的cowboy的,在主页上没有选项可以支持,因此在Software下拉项中选择"None of the Above",操作系统用的是ubuntu16.04,因此在System下拉项中选择"Ubuntu 16.04(Xenial)"。

        按照其操作安装certbot结束后输入命令:

        sudo certbot certonly --standalone -d xyz.com -d www.xyz.com

        上述命令的standalone选项表示使用certbot内置的webserver(需要关闭在80端口上运行的webserver,如果有的话)为域名xyz.com, www.xyz.com生成证书;certonly表示不做任何自动安装的操作。接着进入一系列的交互,最终在提示的目录下生成:

        cert.pem: 服务端证书

        chain.pem: 浏览器需要的所有证书但不包括服务端证书,比如根证书和中间证书

        fullchain.pem: 包括了cert.pem和chain.pem的内容

        privkey.pem: 证书的私钥

        我们游戏上Facebook后出现Android机器连接失败的问题,使用SSL证书检测网站检查了下,中间证书缺失。重新生成证书后,在cowboy中启动SSL时需要注意按以下项配置:

        [{cacertfile, "path/fullchain.pem"},

         {certfile, "path/cert.pem"},

         {keyfile, "path/privkey.pem"}]

        此时再检测时成功通过,Android也正常连接,问题解决。

  • 相关阅读:
    How to Change Error Message Colors in Windows 10 PowerShell Console
    How to expand Azure VM OS Disk
    Ubuntu terminal colors
    Docker proxy
    如何对mRemoteNG在进行Linux终端访问时自定义配色
    100阶乘末尾有多少个零
    几道c/c++练习题
    M-BM-
    从FGUI中取一张图片并返回一个Sprite
    为什么手游选择lua热更新方案。
  • 原文地址:https://www.cnblogs.com/Jackie-Snow/p/9342128.html
Copyright © 2020-2023  润新知