微信小程序后端linux使用xampp配置https

作者: rainlin 分类: 杂记 发布时间: 2017-05-01 15:59

背景

由于最近开发微信小程序,前后端交互需要使用https协议,故需要配置https服务

服务器环境

  • 服务器系统 ubuntu
  • 环境 xampp
  • SSL服务 let’s encript

步骤

  • 安装certbot-auto:
wget https://dl.eff.org/certbot-auto --no-check-certificate
chmod +x ./certbot-auto
./certbot-auto -n
  • 申请证书:
./certbot-auto certonly --webroot --webroot-path /opt/lampp/htdocs -d xxxxx.com --agree-tos --email xxxxxx@qq.com
  • 证书在/etc/letsencrypt/live/xxxxx.com目录下,
    然后我们需要两个:fullchain.pemprivkey.pem
    将其移动到/opt/lampp/etc/ssl.crt/opt/lampp/etc/ssl.key中,
    并进行相应改名为 server.keyserver.crt

  • 开启xampp的ssl功能:xampp enablessl

 

 

本文链接: http://rainlin.top/archives/96
转载请注明转载自: Rainlin Home

发表评论

邮箱地址不会被公开。 必填项已用*标注