您当前的位置: 首页 >  http

蓝不蓝编程

暂无认证

  • 2浏览

    0关注

    706博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文

阿里云申请免费https证书及部署全过程介绍

蓝不蓝编程 发布时间:2019-05-23 15:20:59 ,浏览量:2

操作步骤
  1. 阿里云申请https证书 访问 云盾证书服务,选择“免费行DV SSL”
  2. 申请完证书,下载下来(一个key文件,一个pem文件)
  3. 转为jks格式 openssl pkcs12 -export -inkey mydomain.key -in mydomain.pem -name server -out server.p12 设置密码(要记录下来,后面要用),上面命令中“server”是别名alias. keytool -importkeystore -srckeystore server.p12 -srcstoretype pkcs12 -destkeystore server.jks 设置密码(要记录下来,后面要用) 生成的server.jks就是用于服务器的https证书
  4. 上传https证书到服务器 5.服务器配置https证书 根据不同的容器,配置文件会存在差异: 下面是ktor的配置
ktor {
  deployment {
    port = 80
    sslPort = 443
    watch = ["shellNoteServer"]
  }
  security {
    ssl {
      keyStore = server.jks
      keyAlias = server
      keyStorePassword = xxxxxx
      privateKeyPassword = xxxxxx
    }
  }
}
参考资料

https://www.jianshu.com/p/282a02238f5c

关注
打赏
1639405877
查看更多评论
立即登录/注册

微信扫码登录

0.0386s